JsonObject::set() copies the content of an object to the object pointed by the JsonObject.

If the JsonObject is null/unbound, this function does nothing.


bool set(JsonObjectConst obj) const;


obj: a JsonObjectConst pointing to the object to copy.

Return value

JsonObject::set() returns a bool that tells whether the operation was successful or not:

  • true if the operation is successful
  • false if there was not enough room in the JsonDocument.

See also