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
Copy file name to clipboardExpand all lines: README.md
+14-4
Original file line number
Diff line number
Diff line change
@@ -27,25 +27,34 @@ The Art of C++ / JSON is a zero-dependency C++11 header-only library that provid
27
27
* Provides JSON Value (DOM-style).
28
28
* Provides JSON Events (SAX-style).
29
29
* Numeric values are stored as `std::int64_t`, `std::uint64_t` or `double`.
30
+
* Allows storing and handling non-finite floating point values `NaN`, `Infinity` and `-Infinity`.
31
+
* Allows storing and handling of binary data.
30
32
* Does *not* support duplicate keys in JSON objects.
31
33
* Currently only supports UTF-8 as input and output encoding.
32
34
33
35
* Value API
34
36
35
37
* Construction of objects and arrays via `std::initializer_list`.
36
38
* Allows construction of JSON value objects from arbitrary *user-defined types* with specialised traits class template.
37
-
* Standard STL 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.
39
+
* Standard STL containers:
40
+
*`std::string` for JSON strings
41
+
*`std::vector< tao::json::value >` for JSON arrays
42
+
*`std::map< std::string, tao::json::value >` for JSON objects
43
+
*`std::vector< tao::json::byte >` for JAXN binary data. (`tao::json::byte` is an alias for `std::byte` when available).
38
44
* No memory allocations by the JSON value class itself (the wrapped standard containers perform their memory allocations normally).
39
45
* Indirect JSON values via non-owning C++ raw pointers for object sharing, reference resolution, and important optimization opportunities.
40
-
* C++11 literal operator for JSON values.
46
+
* C++11 literal operator for JSON values, including binary data.
41
47
42
48
* Events API
43
49
44
50
* Simple, straightforward JSON Events API.
51
+
* JSON Events-to-Value and Value-to-Events interfaces.
45
52
* Parse JSON string representation to JSON Events.
53
+
* Parse JAXN string representation to JSON Events.
46
54
* Stream JSON Events to (prettified) JSON string representation.
47
-
* JSON Events-to-Value and Value-to-Events interfaces.
48
-
* Supports conversion from and to *other* JSON objects (check [`contrib/nlohmann.cpp`](contrib/nlohmann.cpp)).
55
+
* Stream JSON Events to (prettified) JAXN string representation.
56
+
* Supports conversion from and to binary formats, e.g. CBOR, UBJSON, MsgPack, etc.
57
+
* Supports conversion from and to *other* JSON value objects (check [`contrib/nlohmann.cpp`](contrib/nlohmann.cpp)).
49
58
* JSON Events comparison (against an existing JSON Value).
50
59
* JSON Events hash algorithm (SHA-256 based).
51
60
* JSON Events schema validator.
@@ -63,6 +72,7 @@ The documentation will be finished once the functionality and interfaces are fin
63
72
Until then, here are a few short indications on how to use this library:
64
73
65
74
* Requires Clang or GCC with `-std=c++11` (or other compiler with sufficient C++11 support).
75
+
* Currently requires a 64 bits environment.
66
76
* The library is header-only, to install and use simply copy the directory [`include/tao`](include/tao) to a convenient place and include the file [`include/tao/json.hpp`](include/tao/json.hpp).
67
77
* The generic JSON value class, the main part of this library, is in [`include/tao/json/value.hpp`](include/tao/json/value.hpp).
68
78
* To parse a JSON string representation to a JSON Value, use one of the functions in [`include/tao/json/from_string.hpp`](include/tao/json/from_string.hpp) or [`include/tao/json/parse_file.hpp`](include/tao/json/parse_file.hpp).
0 commit comments