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

Complete documentation for 3.11.0 #3464

Merged
merged 25 commits into from
May 17, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
5a26dbe
:busts_in_silhouette: update contributor and sponsor list
nlohmann May 1, 2022
4e4c4f0
:construction: document BJData format
nlohmann May 1, 2022
e44c279
:construction: document BJData format
nlohmann May 1, 2022
09d4c3b
:memo: clarified documentation of [json.exception.parse_error.112]
nlohmann May 7, 2022
aacd97a
:pencil2: adjust titles
nlohmann May 7, 2022
14c523c
:memo: add more examples
nlohmann May 8, 2022
3905522
:rotating_light: adjust warnings for index.md files
nlohmann May 8, 2022
8986699
:memo: add more examples
nlohmann May 8, 2022
e1ed7fb
:fire: remove example for deprecated code
nlohmann May 8, 2022
2ecda94
:memo: add missing enum entry
nlohmann May 8, 2022
30ce3f8
:memo: overwork table for binary formats
nlohmann May 8, 2022
a6a9b43
:white_check_mark: add test to create table for binary formats
nlohmann May 8, 2022
5f27311
:memo: fix wording in example
nlohmann May 8, 2022
3af932e
:memo: add more examples
nlohmann May 8, 2022
7cef6e7
Update iterators.md (#3481)
prncoprs May 10, 2022
dfcad29
:sparkles: add check for overloads to linter #3455
nlohmann May 10, 2022
7e8ee6f
:busts_in_silhouette: update contributor list
nlohmann May 10, 2022
25c3c18
:memo: add more examples
nlohmann May 10, 2022
616ce60
:memo: fix documentation
nlohmann May 10, 2022
02ff16f
Merge remote-tracking branch 'origin/documentation' into documentation
nlohmann May 10, 2022
875e9a3
:memo: add more examples
nlohmann May 10, 2022
892247d
:art: fix indentation
nlohmann May 10, 2022
fa14739
:fire: remove example for destructor
nlohmann May 10, 2022
7942a15
:memo: overwork documentation
nlohmann May 11, 2022
5fe1424
Updated BJData documentation, #3464 (#3493)
fangq May 15, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions docs/examples/~basic_json.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#include <iostream>
#include <nlohmann/json.hpp>

using json = nlohmann::json;

int main()
{
json* j = new json("Hello, world!");
std::cout << *j << std::endl;

// explicitly call destructor
delete j;
nlohmann marked this conversation as resolved.
Show resolved Hide resolved
}
1 change: 1 addition & 0 deletions docs/examples/~basic_json.output
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"Hello, world!"
16 changes: 16 additions & 0 deletions docs/mkdocs/docs/api/basic_json/~basic_json.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@ No-throw guarantee: this member function never throws exceptions.

Linear.

## Examples

??? example

The following code shows an example for the destructor.

```cpp
--8<-- "examples/~basic_json.cpp"
```

Output:

```json
--8<-- "examples/~basic_json.output"
```

## Version history

- Added in version 1.0.0.