Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
json
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
json
Commits
ce6adc44
Unverified
Commit
ce6adc44
authored
Aug 13, 2020
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
📝
add more API documentation
parent
d360fec2
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
97 additions
and
3 deletions
+97
-3
doc/docset/docSet.sql
doc/docset/docSet.sql
+3
-0
doc/mkdocs/docs/api/basic_json/index.md
doc/mkdocs/docs/api/basic_json/index.md
+3
-3
doc/mkdocs/docs/api/basic_json/operator""_json.md
doc/mkdocs/docs/api/basic_json/operator""_json.md
+32
-0
doc/mkdocs/docs/api/basic_json/operator""_json_pointer.md
doc/mkdocs/docs/api/basic_json/operator""_json_pointer.md
+32
-0
doc/mkdocs/docs/api/json_pointer.md
doc/mkdocs/docs/api/json_pointer.md
+24
-0
doc/mkdocs/mkdocs.yml
doc/mkdocs/mkdocs.yml
+3
-0
No files found.
doc/docset/docSet.sql
View file @
ce6adc44
...
...
@@ -47,6 +47,7 @@ INSERT INTO searchIndex(name, type, path) VALUES ('is_string', 'Method', 'api/ba
INSERT
INTO
searchIndex
(
name
,
type
,
path
)
VALUES
(
'is_structured'
,
'Method'
,
'api/basic_json/is_structured/index.html'
);
INSERT
INTO
searchIndex
(
name
,
type
,
path
)
VALUES
(
'items'
,
'Method'
,
'api/basic_json/items/index.html'
);
INSERT
INTO
searchIndex
(
name
,
type
,
path
)
VALUES
(
'json'
,
'Class'
,
'api/json/index.html'
);
INSERT
INTO
searchIndex
(
name
,
type
,
path
)
VALUES
(
'json_pointer'
,
'Class'
,
'api/json_pointer/index.html'
);
INSERT
INTO
searchIndex
(
name
,
type
,
path
)
VALUES
(
'max_size'
,
'Method'
,
'api/basic_json/max_size/index.html'
);
INSERT
INTO
searchIndex
(
name
,
type
,
path
)
VALUES
(
'merge_patch'
,
'Method'
,
'api/basic_json/merge_patch/index.html'
);
INSERT
INTO
searchIndex
(
name
,
type
,
path
)
VALUES
(
'meta'
,
'Function'
,
'api/basic_json/meta/index.html'
);
...
...
@@ -60,6 +61,8 @@ INSERT INTO searchIndex(name, type, path) VALUES ('operator+=', 'Operator', 'api
INSERT
INTO
searchIndex
(
name
,
type
,
path
)
VALUES
(
'operator='
,
'Operator'
,
'api/basic_json/operator=/index.html'
);
INSERT
INTO
searchIndex
(
name
,
type
,
path
)
VALUES
(
'operator=='
,
'Operator'
,
'api/basic_json/operator==/index.html'
);
INSERT
INTO
searchIndex
(
name
,
type
,
path
)
VALUES
(
'operator[]'
,
'Operator'
,
'api/basic_json/operator[]/index.html'
);
INSERT
INTO
searchIndex
(
name
,
type
,
path
)
VALUES
(
'operator""_json'
,
'Literal'
,
'api/basic_json/operator%22%22_json/index.html'
);
INSERT
INTO
searchIndex
(
name
,
type
,
path
)
VALUES
(
'operator""_json_pointer'
,
'Literal'
,
'api/basic_json/operator%22%22_json_pointer/index.html'
);
INSERT
INTO
searchIndex
(
name
,
type
,
path
)
VALUES
(
'operator value_t'
,
'Operator'
,
'api/basic_json/operator_value_t/index.html'
);
INSERT
INTO
searchIndex
(
name
,
type
,
path
)
VALUES
(
'ordered_json'
,
'Class'
,
'api/ordered_json/index.html'
);
INSERT
INTO
searchIndex
(
name
,
type
,
path
)
VALUES
(
'ordered_map'
,
'Class'
,
'api/ordered_map/index.html'
);
...
...
doc/mkdocs/docs/api/basic_json/index.md
View file @
ce6adc44
...
...
@@ -49,7 +49,7 @@ Todo
## Member types
-
[
**value_t**
](
value_t.md
)
- the JSON type enumeration
-
json_pointer
-
[
**json_pointer**
](
../json_pointer.md
)
- JSON Pointer implementation
-
json_serializer
-
[
**error_handler_t**
](
error_handler_t.md
)
- type to choose behavior on decoding errors
-
cbor_tag_handler_t
...
...
@@ -245,8 +245,8 @@ Access to the JSON value
## Literals
-
operator""_json
-
operator""_json_pointer
-
[
**operator""_json**
](
operator%22%22_json.md
)
- user-defined string literal for JSON values
-
[
**operator""_json_pointer**
](
operator%22%22_json_pointer.md
)
- user-defined string literal for JSON pointers
## Helper classes
...
...
doc/mkdocs/docs/api/basic_json/operator""_json.md
0 → 100644
View file @
ce6adc44
# basic_json::operator""_json
```
cpp
json
operator
""
_json
(
const
char
*
s
,
std
::
size_t
n
)
```
This operator implements a user-defined string literal for JSON objects. It can be used by adding
`#!cpp _json`
to a
string literal and returns a
[
`json`
](
../json.md
)
object if no parse error occurred.
## Parameters
`s`
(in)
: a string representation of a JSON object
`n`
(in)
: length of string
`s`
## Return value
[
`json`
](
../json.md
)
value parsed from
`s`
## Exceptions
The function can throw anything that
[
`parse(s, s+n)`
](
parse.md
)
would throw.
## Complexity
Linear.
## Version history
-
Added in version 1.0.0.
doc/mkdocs/docs/api/basic_json/operator""_json_pointer.md
0 → 100644
View file @
ce6adc44
# basic_json::operator""_json_pointer
```
cpp
json_pointer
operator
""
_json_pointer
(
const
char
*
s
,
std
::
size_t
n
)
```
This operator implements a user-defined string literal for JSON Pointers. It can be used by adding
`#!cpp _json_pointer`
to a string literal and returns a
[
`json_pointer`
](
../json_pointer.md
)
object if no parse error occurred.
## Parameters
`s`
(in)
: a string representation of a JSON Pointer
`n`
(in)
: length of string
`s`
## Return value
[
`json_pointer`
](
../json_pointer.md
)
value parsed from
`s`
## Exceptions
The function can throw anything that
[
`json_pointer::json_pointer`
](
../json_pointer.md
)
would throw.
## Complexity
Linear.
## Version history
-
Added in version 2.0.0.
doc/mkdocs/docs/api/json_pointer.md
0 → 100644
View file @
ce6adc44
# json_pointer
```
cpp
template
<
typename
BasicJsonType
>
class
json_pointer
;
```
## Template parameters
`BasicJsonType`
: a specialization of
[
`basic_json`
](
basic_json/index.md
)
## Member functions
-
(constructor)
-
**to_string**
- return a string representation of the JSON pointer
-
**operator std::string**
- return a string representation of the JSON pointer
-
**operator/=**
- append to the end of the JSON pointer
-
**operator/**
- create JSON Pointer by appending
-
**parent_pointer**
- returns the parent of this JSON pointer
-
**pop_back**
- remove last reference token
-
**back**
- return last reference token
-
**push_back**
- append an unescaped token at the end of the pointer
-
**empty**
- return whether pointer points to the root document
doc/mkdocs/mkdocs.yml
View file @
ce6adc44
...
...
@@ -129,6 +129,8 @@ nav:
-
api/basic_json/operator==.md
-
api/basic_json/operator!=.md
-
api/basic_json/operator+=.md
-
api/basic_json/operator""_json.md
-
api/basic_json/operator""_json_pointer.md
-
api/basic_json/parse.md
-
api/basic_json/parse_event_t.md
-
api/basic_json/parser_callback_t.md
...
...
@@ -146,6 +148,7 @@ nav:
-
api/basic_json/value.md
-
api/basic_json/value_t.md
-
api/json.md
-
api/json_pointer.md
-
api/ordered_map.md
-
api/ordered_json.md
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment