@brief return a string representation of the JSON pointer @sa https://json.nlohmann.me/api/json_pointer/to_string/
| 35 | /// @brief return a string representation of the JSON pointer |
| 36 | /// @sa https://json.nlohmann.me/api/json_pointer/to_string/ |
| 37 | std::string to_string() const |
| 38 | { |
| 39 | return std::accumulate(reference_tokens.begin(), reference_tokens.end(), |
| 40 | std::string{}, |
| 41 | [](const std::string & a, const std::string & b) |
| 42 | { |
| 43 | return a + "/" + detail::escape(b); |
| 44 | }); |
| 45 | } |
| 46 | |
| 47 | /// @brief return a string representation of the JSON pointer |
| 48 | /// @sa https://json.nlohmann.me/api/json_pointer/operator_string/ |