Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
json
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
json
Commits
4a5277d0
Unverified
Commit
4a5277d0
authored
Jul 20, 2020
by
Niels Lohmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
📝
update documentation
parent
8aa6da61
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
3 deletions
+17
-3
ubjson.md
doc/mkdocs/docs/features/binary_formats/ubjson.md
+1
-1
exceptions.md
doc/mkdocs/docs/home/exceptions.md
+14
-0
json.hpp
include/nlohmann/json.hpp
+1
-1
json.hpp
single_include/nlohmann/json.hpp
+1
-1
No files found.
doc/mkdocs/docs/features/binary_formats/ubjson.md
View file @
4a5277d0
...
@@ -28,6 +28,7 @@ number_unsigned | 128..255 | uint8 | `U`
...
@@ -28,6 +28,7 @@ number_unsigned | 128..255 | uint8 | `U`
number_unsigned | 256..32767 | int16 |
`I`
number_unsigned | 256..32767 | int16 |
`I`
number_unsigned | 32768..2147483647 | int32 |
`l`
number_unsigned | 32768..2147483647 | int32 |
`l`
number_unsigned | 2147483648..9223372036854775807 | int64 |
`L`
number_unsigned | 2147483648..9223372036854775807 | int64 |
`L`
number_unsigned | 2147483649..18446744073709551615 | high-precision |
`H`
number_float |
*any value*
| float64 |
`D`
number_float |
*any value*
| float64 |
`D`
string |
*with shortest length indicator*
| string |
`S`
string |
*with shortest length indicator*
| string |
`S`
array |
*see notes on optimized format*
| array |
`[`
array |
*see notes on optimized format*
| array |
`[`
...
@@ -44,7 +45,6 @@ object | *see notes on optimized format* | map | `{`
...
@@ -44,7 +45,6 @@ object | *see notes on optimized format* | map | `{`
The following values can **not** be converted to a UBJSON value:
The following values can **not** be converted to a UBJSON value:
- strings with more than 9223372036854775807 bytes (theoretical)
- strings with more than 9223372036854775807 bytes (theoretical)
- unsigned integer numbers above 9223372036854775807
!!! info "Unused UBJSON markers"
!!! info "Unused UBJSON markers"
...
...
doc/mkdocs/docs/home/exceptions.md
View file @
4a5277d0
...
@@ -279,6 +279,16 @@ The parsing of the corresponding BSON record type is not implemented (yet).
...
@@ -279,6 +279,16 @@ The parsing of the corresponding BSON record type is not implemented (yet).
[json.exception.parse_error.114] parse error at byte 5: Unsupported BSON record type 0xFF
[json.exception.parse_error.114] parse error at byte 5: Unsupported BSON record type 0xFF
```
```
### json.exception.parse_error.115
A UBJSON high-precision number could not be parsed.
!!! failure "Example message"
```
[json.exception.parse_error.115] parse error at byte 5: syntax error while parsing UBJSON high-precision number: invalid number text: 1A
```
## Iterator errors
## Iterator errors
This exception is thrown if iterators passed to a library function do not match
This exception is thrown if iterators passed to a library function do not match
...
@@ -765,6 +775,10 @@ UBJSON and BSON only support integer numbers up to 9223372036854775807.
...
@@ -765,6 +775,10 @@ UBJSON and BSON only support integer numbers up to 9223372036854775807.
number overflow serializing '9223372036854775808'
number overflow serializing '9223372036854775808'
```
```
!!! note
Since version 3.9.0, integer numbers beyond int64 are serialized as high-precision UBJSON numbers, and this exception does not further occur.
### json.exception.out_of_range.408
### json.exception.out_of_range.408
The size (following
`#`
) of an UBJSON array or object exceeds the maximal capacity.
The size (following
`#`
) of an UBJSON array or object exceeds the maximal capacity.
...
...
include/nlohmann/json.hpp
View file @
4a5277d0
...
@@ -7200,6 +7200,7 @@ class basic_json
...
@@ -7200,6 +7200,7 @@ class basic_json
number_unsigned | 256..32767 | int16 | `I`
number_unsigned | 256..32767 | int16 | `I`
number_unsigned | 32768..2147483647 | int32 | `l`
number_unsigned | 32768..2147483647 | int32 | `l`
number_unsigned | 2147483648..9223372036854775807 | int64 | `L`
number_unsigned | 2147483648..9223372036854775807 | int64 | `L`
number_unsigned | 2147483649..18446744073709551615 | high-precision | `H`
number_float | *any value* | float64 | `D`
number_float | *any value* | float64 | `D`
string | *with shortest length indicator* | string | `S`
string | *with shortest length indicator* | string | `S`
array | *see notes on optimized format* | array | `[`
array | *see notes on optimized format* | array | `[`
...
@@ -7210,7 +7211,6 @@ class basic_json
...
@@ -7210,7 +7211,6 @@ class basic_json
@note The following values can **not** be converted to a UBJSON value:
@note The following values can **not** be converted to a UBJSON value:
- strings with more than 9223372036854775807 bytes (theoretical)
- strings with more than 9223372036854775807 bytes (theoretical)
- unsigned integer numbers above 9223372036854775807
@note The following markers are not used in the conversion:
@note The following markers are not used in the conversion:
- `Z`: no-op values are not created.
- `Z`: no-op values are not created.
...
...
single_include/nlohmann/json.hpp
View file @
4a5277d0
...
@@ -23433,6 +23433,7 @@ class basic_json
...
@@ -23433,6 +23433,7 @@ class basic_json
number_unsigned | 256..32767 | int16 | `I`
number_unsigned | 256..32767 | int16 | `I`
number_unsigned | 32768..2147483647 | int32 | `l`
number_unsigned | 32768..2147483647 | int32 | `l`
number_unsigned | 2147483648..9223372036854775807 | int64 | `L`
number_unsigned | 2147483648..9223372036854775807 | int64 | `L`
number_unsigned | 2147483649..18446744073709551615 | high-precision | `H`
number_float | *any value* | float64 | `D`
number_float | *any value* | float64 | `D`
string | *with shortest length indicator* | string | `S`
string | *with shortest length indicator* | string | `S`
array | *see notes on optimized format* | array | `[`
array | *see notes on optimized format* | array | `[`
...
@@ -23443,7 +23444,6 @@ class basic_json
...
@@ -23443,7 +23444,6 @@ class basic_json
@note The following values can **not** be converted to a UBJSON value:
@note The following values can **not** be converted to a UBJSON value:
- strings with more than 9223372036854775807 bytes (theoretical)
- strings with more than 9223372036854775807 bytes (theoretical)
- unsigned integer numbers above 9223372036854775807
@note The following markers are not used in the conversion:
@note The following markers are not used in the conversion:
- `Z`: no-op values are not created.
- `Z`: no-op values are not created.
...
...
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