1 #ifndef SIMDJSON_JSONPATHUTIL_H
2 #define SIMDJSON_JSONPATHUTIL_H
17 if (!json_path.empty() && json_path.front() ==
'$') {
20 if (json_path.empty() || (json_path[i] !=
'.' &&
21 json_path[i] !=
'[')) {
28 result.reserve(json_path.size() * 2);
30 while (i < json_path.length()) {
31 if (json_path[i] ==
'.') {
33 }
else if (json_path[i] ==
'[') {
36 while (i < json_path.length() && json_path[i] !=
']') {
37 if (json_path[i] ==
'~') {
39 }
else if (json_path[i] ==
'/') {
42 result += json_path[i];
46 if (i == json_path.length() || json_path[i] !=
']') {
50 if (json_path[i] ==
'~') {
52 }
else if (json_path[i] ==
'/') {
55 result += json_path[i];
The top level simdjson namespace, containing everything the library provides.
std::string json_path_to_pointer_conversion(std::string_view json_path)
Converts JSONPath to JSON Pointer.