-[Conversion from STL containers](#conversion-from-stl-containers)
-[JSON Pointer and JSON Patch](#json-pointer-and-json-patch)
-[Implicit conversions](#implicit-conversions)
-[Binary formats (CBOR and MessagePack)](#binary-formats-cbor-and-messagepack)
-[Supported compilers](#supported-compilers)
-[License](#license)
-[Thanks](#thanks)
-[Notes](#notes)
-[Execute unit tests](#execute-unit-tests)
## Design goals
## Design goals
There are myriads of [JSON](http://json.org) libraries out there, and each may even have its reason to exist. Our class had these design goals:
There are myriads of [JSON](http://json.org) libraries out there, and each may even have its reason to exist. Our class had these design goals:
...
@@ -48,6 +64,8 @@ to the files you want to use JSON objects. That's it. Do not forget to set the n
...
@@ -48,6 +64,8 @@ to the files you want to use JSON objects. That's it. Do not forget to set the n
## Examples
## Examples
### JSON as first-class data type
Here are some examples to give you an idea how to use the class.
Here are some examples to give you an idea how to use the class.
Assume you want to create the JSON object
Assume you want to create the JSON object
...
@@ -421,6 +439,31 @@ int vi = jn.get<int>();
...
@@ -421,6 +439,31 @@ int vi = jn.get<int>();
// etc.
// etc.
```
```
### Binary formats (CBOR and MessagePack)
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 [CBOR](http://cbor.io)(Concise Binary Object Representation) and [MessagePack](http://msgpack.org) to efficiently encode JSON values to byte vectors and to decode such vectors.