Skip to content

Commit

Permalink
Small documentation fixes (#3520)
Browse files Browse the repository at this point in the history
  • Loading branch information
nlohmann authored Jun 6, 2022
1 parent 7c65b5c commit b6d00d1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1622,6 +1622,7 @@ I deeply appreciate the help of the following people.
- [Andrea Cocito](https://github.com/puffetto) added a clarification on macro usage to the documentation.
- [Krzysiek Karbowiak](https://github.com/kkarbowiak) refactored the tests to use `CHECK_THROWS_WITH_AS`.
- [Chaoqi Zhang](https://github.com/prncoprs) fixed a typo.
- [ivanovmp](https://github.com/ivanovmp) fixed a whitespace error.

Thanks a lot for helping out! Please [let me know](mailto:mail@nlohmann.me) if I forgot someone.

Expand Down Expand Up @@ -1656,7 +1657,7 @@ The library itself consists of a single header file licensed under the MIT licen

## Projects using JSON for Modern C++

The library is currently used in Apple macOS Sierra and iOS 10. I am not sure what they are using the library for, but I am happy that it runs on so many devices.
The library is currently used in Apple macOS Sierra-Monterey and iOS 10-15. I am not sure what they are using the library for, but I am happy that it runs on so many devices.


## Notes
Expand Down
7 changes: 5 additions & 2 deletions docs/mkdocs/docs/features/json_pointer.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ Consider the following JSON document
}
```

Then every value inside the JSON document can be idientified as follows:
Then every value inside the JSON document can be identified as follows:

| JSON Pointer | JSON value |
|-------------------|----------------------------------------------------------------------------------|
| `/` | `#!json {"array":["A","B","C"],"nested":{"one":1,"two":2,"three":[true,false]}}` |
| `` | `#!json {"array":["A","B","C"],"nested":{"one":1,"two":2,"three":[true,false]}}` |
| `/array` | `#!json ["A","B","C"]` |
| `/array/0` | `#!json A` |
| `/array/1` | `#!json B` |
Expand All @@ -34,6 +34,9 @@ Then every value inside the JSON document can be idientified as follows:
| `/nested/three/0` | `#!json true` |
| `/nested/three/1` | `#!json false` |

Note `/` does not identify the root (i.e., the whole document), but an object entry with empty key `""`. See
[RFC 6901](https://tools.ietf.org/html/rfc6901) for more information.

## JSON Pointer creation

JSON Pointers can be created from a string:
Expand Down

0 comments on commit b6d00d1

Please sign in to comment.