Please consider implementing Section 3 of RFC6901 which provides pointer syntax. This is VERY useful for modifying the JSON structures. For example, suppose I have a program that takes a JSON file, and JSON pointer, a new value, then writes the updated JSON to the file:
$> ./json_update stuff.json /hello/foo/7 world
The code is easy to implement the update like this:
val json = read_json_from_file(args(0))
json(args(1)) = args(2)
write_json_to_file(json, args(0))
This is implemented nicely in the highly popular nlohmann::json C++ library:
see here
Please consider implementing Section 3 of RFC6901 which provides pointer syntax. This is VERY useful for modifying the JSON structures. For example, suppose I have a program that takes a JSON file, and JSON pointer, a new value, then writes the updated JSON to the file:
The code is easy to implement the update like this:
This is implemented nicely in the highly popular nlohmann::json C++ library: see here
ID: 368 Original Author: nicmcd