📝 add mkdocs
This commit is contained in:
parent
c92a696852
commit
a8f0cd15df
36 changed files with 2656 additions and 261 deletions
41
doc/mkdocs/docs/features/binary_formats/index.md
Normal file
41
doc/mkdocs/docs/features/binary_formats/index.md
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
# Overview
|
||||
|
||||
Though JSON is a ubiquitous data format, it is not a very compact format suitable for data exchange, for instance over a network. Hence, the library supports
|
||||
|
||||
- [BSON](bson) (Binary JSON),
|
||||
- [CBOR](cbor) (Concise Binary Object Representation),
|
||||
- [MessagePack](messagepack), and
|
||||
- [UBJSON](ubjson) (Universal Binary JSON Specification)
|
||||
|
||||
to efficiently encode JSON values to byte vectors and to decode such vectors.
|
||||
|
||||
## Comparison
|
||||
|
||||
### Completeness
|
||||
|
||||
| Format | Serialization | Deserialization |
|
||||
| ----------- |---------------------------------------------- | -------------------------------------------- |
|
||||
| BSON | incomplete: top-level value must be an object | incomplete, but all JSON types are supported |
|
||||
| CBOR | complete | incomplete, but all JSON types are supported |
|
||||
| MessagePack | complete | complete |
|
||||
| UBJSON | complete | complete |
|
||||
|
||||
### Binary values
|
||||
|
||||
| Format | Binary values | Binary subtypes |
|
||||
| ----------- | ------------- | --------------- |
|
||||
| BSON | supported | supported |
|
||||
| CBOR | supported | not supported |
|
||||
| MessagePack | supported | supported |
|
||||
| UBJSON | not supported | not supported |
|
||||
|
||||
### Sizes
|
||||
|
||||
| Format | canada.json | twitter.json | citm_catalog.json | jeopardy.json |
|
||||
| ------------------ | ----------- | ------------ | ----------------- | ------------- |
|
||||
| BSON | 85,8 % | 95,2 % | 95,8 % | 106,7 % |
|
||||
| CBOR | 50,5 % | 86,3 % | 68,4 % | 88,0 % |
|
||||
| MessagePack | 50,6 % | 86,0 % | 68,5 % | 87,9 % |
|
||||
| UBJSON | 53,2 % | 91,3 % | 78,2 % | 96,6 % |
|
||||
| UBJSON (size) | 58,6 % | 92,3 % | 86,8 % | 97,4 % |
|
||||
| UBJSON (size+type) | 55,9 % | 92,3 % | 85,0 % | 95,0 % |
|
||||
Loading…
Add table
Add a link
Reference in a new issue