FastLED 3.10.8
Loading...
Searching...
No Matches

◆ to_string()

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

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

1141 {
1142 // Parse the JSON value to a string, then parse it back to a json object,
1143 // and use the working to_string_native method
1144 // This is a workaround to avoid reimplementing the serialization logic
1145
1146 // First, create a temporary json document with this value
1147 json temp;
1148 // Use the public method to set the value
1149 temp.set_value(fl::make_shared<json_value>(*this));
1150 // Use the working implementation
1151 return temp.to_string_native();
1152}
shared_ptr< T > make_shared(Args &&... args) FL_NO_EXCEPT
Definition shared_ptr.h:423
friend class json
Definition types.h:741

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

+ Here is the call graph for this function: