Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeuz committed Aug 28, 2024
1 parent 58f1aab commit 3105d62
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion wiring/inc/spark_wiring_variant.h
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,11 @@ class Variant {
* to or from string is performed. When converted to a string, boolean values are represented
* as "true" or "false".
*
* - For the null, array and map types, only a trivial conversion to the same type is defined.
* - A `String` can be converted to a `Buffer` but only a trivial conversion to a value of its
* own type is defined for `Buffer`.
*
* - For the null, array and map types, only a trivial conversion to the respective type is
* defined.
*
* - If no conversion is defined for the current and target types, a default-constructed value
* of the target type is returned.
Expand Down Expand Up @@ -668,6 +672,11 @@ class Variant {
/**
* Convert the variant to JSON.
*
* Note that values of certain types supported by `Variant`, such as `Buffer`, cannot normally be
* represented in JSON. If the variant contains a value of such a type, it is not guaranteed that a
* backward conversion from a JSON string returned by this method would produce a variant equal to
* the original variant.
*
* @return JSON document.
*/
String toJSON() const;
Expand Down

0 comments on commit 3105d62

Please sign in to comment.