Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quick and convenient api to get/set nested json values #2120

Closed
myseemylife opened this issue May 18, 2020 · 2 comments
Closed

quick and convenient api to get/set nested json values #2120

myseemylife opened this issue May 18, 2020 · 2 comments
Labels
kind: enhancement/improvement solution: proposed fix a fix for the issue has been proposed and waits for confirmation

Comments

@myseemylife
Copy link

  • Describe the feature in as much detail as possible.
    while i used to use a json library which export a nice api. access or write values like this:
    json["a.b.c.d.0.b"]
  • Include sample usage where appropriate.
    eg:
    json v = '{a:{b:[ {c:'ok'}]}}'_json
    get values : v["a.b.0.c"]
    set values: v["a.b.0.c"] = "123"
@nlohmann
Copy link
Owner

You can use JSON Pointer (see https://github.com/nlohmann/json#json-pointer-and-json-patch).

@nlohmann nlohmann added the solution: proposed fix a fix for the issue has been proposed and waits for confirmation label May 18, 2020
@myseemylife
Copy link
Author

great! i 'll try it. thx for your guide!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: enhancement/improvement solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Projects
None yet
Development

No branches or pull requests

2 participants