FastLED 3.9.15
Loading...
Searching...
No Matches

◆ to_string()

fl::string fl::JsonValue::to_string ( ) const

Definition at line 277 of file json.cpp.

277 {
278 // Parse the JSON value to a string, then parse it back to a Json object,
279 // and use the working to_string_native method
280 // This is a workaround to avoid reimplementing the serialization logic
281
282 // First, create a temporary Json document with this value
283 Json temp;
284 // Use the public method to set the value
285 temp.set_value(fl::make_shared<JsonValue>(*this));
286 // Use the working implementation
287 return temp.to_string_native();
288}
shared_ptr< T > make_shared(Args &&... args)
Definition shared_ptr.h:348
friend class Json
Definition json.h:658

References Json, fl::make_shared(), fl::Json::set_value(), and fl::Json::to_string_native().

+ Here is the call graph for this function: