MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / flatten

Function flatten

3rd/nlohmann_json/include/nlohmann/json.hpp:8343–8348  ·  view source on GitHub ↗

! @brief return flattened JSON value The function creates a JSON object whose keys are JSON pointers (see [RFC 6901](https://tools.ietf.org/html/rfc6901)) and whose values are all primitive. The original JSON value can be restored using the @ref unflatten() function. @return an object that maps JSON pointers to primitive values @note Empty objects and arrays are flat

Source from the content-addressed store, hash-verified

8341 @since version 2.0.0
8342 */
8343 basic_json flatten() const
8344 {
8345 basic_json result(value_t::object);
8346 json_pointer::flatten("", *this, result);
8347 return result;
8348 }
8349
8350 /*!
8351 @brief unflatten a previously flattened JSON value

Callers 1

json_pointer.hppFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected