You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The Art of C++ / JSON is a zero-dependency C++11 header-only library that provides a generic JSON value objectas well as conversions from and to JSON string representation. It also serves as a fully functional real-world example application for the [Parsing Expression Grammar Template Library (PEGTL)](https://github.com/ColinH/PEGTL). It is designed for correctness and simplicity, and strives for speed through minimalism (rather than complicated optimisations).
9
+
The Art of C++ / JSON is a zero-dependency C++11 header-only library that provides a generic JSON value object, support for JSON Pointers as well as conversions from and to JSON string representation. It is designed for correctness and simplicity, and strives for speed through minimalism (rather than complicated optimisations).
10
10
11
11
## Features
12
12
13
+
*[RFC7159], [ECMA-404]: The JavaScript Object Notation (JSON) Data Interchange Format
* Numeric values are stored as `int64_t`, `uint64_t` or `double` internally.
14
16
* Standard containers `std::string` for JSON strings, `std::vector< tao::json::value >` for JSON arrays, and `std::map< std::string, tao::json::value >` for JSON objects.
15
-
* Indirect JSON values via non-owning pointers for object sharing.
16
17
* No memory allocations by the JSON value class itself (the wrapped standard containers perform their memory allocations normally).
17
-
*Allows construction of JSON value objects from arbitrary user-defined data-types with specialised traits class template.
18
+
*Indirect JSON values via non-owning C++ raw pointers for object sharing.
18
19
* Construction of objects and arrays via `std::initializer_list`.
20
+
* Allows construction of JSON value objects from arbitrary user-defined data-types with specialised traits class template.
The core JSON value class is implemented and working.
25
26
26
-
The conversions from and to JSON string representation are finished and achieve a 100% score in the [Native JSON Benchmark](https://github.com/miloyip/nativejson-benchmark) conformance tests.
27
+
The conversions from and to JSON string representation are finished and achieve a 100% score in the [Native JSON Benchmark](https://github.com/miloyip/nativejson-benchmark) conformance tests. This also serves as a fully functional real-world example for the [Parsing Expression Grammar Template Library (PEGTL)](https://github.com/ColinH/PEGTL), which is used for parsing JSON string representations.
27
28
28
29
Some parts of the API are still under discussion and development and might change and/or be extended before the first release.
29
30
@@ -39,17 +40,6 @@ Until then, here are a few short indications on how to use this library:
39
40
* To parse a JSON string representation, use one of the functions in [`include/tao/json/from_string.hh`](include/tao/json/from_string.hh) or [`include/tao/json/parse_file.hh`](include/tao/json/parse_file.hh).
40
41
* To produce a JSON string representation, use one of the appropriate functions in [`include/tao/json/to_string.hh`](include/tao/json/to_string.hh) or [`include/tao/json/stream.hh`](include/tao/json/stream.hh).
41
42
42
-
For questions and suggestions please contact the authors at **jsonl(at)colin-hirsch.net**.
43
-
44
-
#### Thank You
45
-
46
-
* Niels Lohmann and his [JSON library](https://github.com/nlohmann/json) for the inspiration.
47
-
* Milo Yip and his [Native JSON Benchmark](https://github.com/miloyip/nativejson-benchmark) for a reference to measure progress against.
48
-
49
-
## Contact
50
-
51
-
For questions and suggestions about the Art of C++ / JSON please contact the authors at `jsonl(at)colin-hirsch.net`.
52
-
53
43
## License
54
44
55
45
The Art of C++ is certified [Open Source](http://www.opensource.org/docs/definition.html) software. It may be used for any purpose, including commercial purposes, at absolutely no cost. It is distributed under the terms of the [MIT license](http://www.opensource.org/licenses/mit-license.html) reproduced here.
@@ -62,6 +52,17 @@ The Art of C++ is certified [Open Source](http://www.opensource.org/docs/definit
62
52
>
63
53
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
64
54
55
+
## Contact
56
+
57
+
For questions and suggestions about the Art of C++ / JSON please contact the authors at `jsonl(at)colin-hirsch.net`.
58
+
59
+
## Thank You
60
+
61
+
* Niels Lohmann and his [JSON library](https://github.com/nlohmann/json) for the inspiration.
62
+
* Milo Yip and his [Native JSON Benchmark](https://github.com/miloyip/nativejson-benchmark) for a reference to measure progress against.
63
+
64
+
## Additional Licenses
65
+
65
66
### PEGTL License
66
67
67
68
The Art of C++ / JSON library contains [the PEGTL library](https://github.com/ColinH/PEGTL) which is licensed as follows:
@@ -85,3 +86,7 @@ The Art of C++ / JSON library contains slightly modified portions of the [double
85
86
> * Neither the name of Google Inc. nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
86
87
>
87
88
> THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
0 commit comments