MCPcopy Create free account
hub / github.com/CppMicroServices/CppMicroServices / ToJSON

Function ToJSON

framework/include/cppmicroservices/Any.h:624–628  ·  view source on GitHub ↗

* Returns a JSON representation for the content. * * Custom types should specialize the any_value_to_json template function for meaningful output. * The values of increment and indent are passed around to be able to be used for nicer * formatting. The code that makes use of this is in the any_value_to_json specializations for the * various containers.

Source from the content-addressed store, hash-verified

622 * @param indent The current amount of indent to apply to the current line.
623 */
624 std::string
625 ToJSON(uint8_t const increment, int32_t const indent) const
626 {
627 return Empty() ? "null" : _content->ToJSON(increment, indent);
628 }
629 std::string
630 ToJSON(bool prettyPrint = false) const
631 {

Callers

nothing calls this directly

Calls 2

EmptyFunction · 0.85
ToJSONMethod · 0.80

Tested by

no test coverage detected