! @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
| 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 |