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

◆ to_string()

fl::string fl::json_value::to_string ( ) const

Definition at line 1113 of file json.cpp.hpp.

1113 {
1114 // Parse the JSON value to a string, then parse it back to a json object,
1115 // and use the working to_string_native method
1116 // This is a workaround to avoid reimplementing the serialization logic
1117
1118 // First, create a temporary json document with this value
1119 json temp;
1120 // Use the public method to set the value
1121 temp.set_value(fl::make_shared<json_value>(*this));
1122 // Use the working implementation
1123 return temp.to_string_native();
1124}
shared_ptr< T > make_shared(Args &&... args) FL_NOEXCEPT
Definition shared_ptr.h:414
friend class json
Definition types.h:681

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

+ Here is the call graph for this function: