mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
2b532489cc
* First implementation of the conversion logic. - Not yet tested - Not yet compiled - Not yet used in ondemand array/object/etc... * Adding at_path to ondemand arrays * Adding at_path to array, document and value. * Adding at_path to ondemand object as well. Pending: - Building - Adding tests for each of the on-demand classes usage of at_path - Properly documenting the subset of json path that is currently supported. * Adding a simple json_path test to on_demand * Still trying to compile the ondemand_readme_examples test with the at_path() call * Fixing linking issues with array::at_path * Fixing issues with the path -> pointer conversion and removing comments * Adding a clone of json_pointer to test json_path extensively * Adding ondemand_json_path_tests (all tests passing) * Adding documentation for at_path() * Removing some newlines * Removing simdjson_result from the return type of the string conversion function. Now json_path_to_pointer_conversion returns a std::string. * Fixing typo * Making string concatenation explicit to avoid ubuntu gcc12 issue with -O3 flag. * Addressing latest reviews * Addressing latest reviews
23 lines
675 B
C++
23 lines
675 B
C++
#pragma once
|
|
|
|
#ifndef SIMDJSON_ONDEMAND_GENERIC_JSON_PATH_TO_POINTER_CONVERSION_H
|
|
#define SIMDJSON_ONDEMAND_GENERIC_JSON_PATH_TO_POINTER_CONVERSION_H
|
|
|
|
namespace simdjson {
|
|
namespace SIMDJSON_IMPLEMENTATION {
|
|
namespace internal {
|
|
|
|
/**
|
|
* Converts JSONPath to JSON Pointer.
|
|
* @param json_path The JSONPath string to be converted.
|
|
* @return A string containing the equivalent JSON Pointer.
|
|
* @throws simdjson_error If the conversion fails.
|
|
*/
|
|
simdjson_inline std::string json_path_to_pointer_conversion(std::string_view json_path);
|
|
|
|
} // namespace internal
|
|
} // namespace SIMDJSON_IMPLEMENTATION
|
|
} // namespace simdjson
|
|
|
|
#endif // SIMDJSON_JSON_PATH_TO_POINTER_CONVERSION_H
|