Skip to content

Commit 18f1261

Browse files
committed
Add a few more points about binary, events API, etc.
1 parent 0a9b672 commit 18f1261

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

README.md

+14-4
Original file line numberDiff line numberDiff line change
@@ -27,25 +27,34 @@ The Art of C++ / JSON is a zero-dependency C++11 header-only library that provid
2727
* Provides JSON Value (DOM-style).
2828
* Provides JSON Events (SAX-style).
2929
* 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.
3032
* Does *not* support duplicate keys in JSON objects.
3133
* Currently only supports UTF-8 as input and output encoding.
3234

3335
* Value API
3436

3537
* Construction of objects and arrays via `std::initializer_list`.
3638
* 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).
3844
* No memory allocations by the JSON value class itself (the wrapped standard containers perform their memory allocations normally).
3945
* 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.
4147

4248
* Events API
4349

4450
* Simple, straightforward JSON Events API.
51+
* JSON Events-to-Value and Value-to-Events interfaces.
4552
* Parse JSON string representation to JSON Events.
53+
* Parse JAXN string representation to JSON Events.
4654
* 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)).
4958
* JSON Events comparison (against an existing JSON Value).
5059
* JSON Events hash algorithm (SHA-256 based).
5160
* JSON Events schema validator.
@@ -63,6 +72,7 @@ The documentation will be finished once the functionality and interfaces are fin
6372
Until then, here are a few short indications on how to use this library:
6473

6574
* Requires Clang or GCC with `-std=c++11` (or other compiler with sufficient C++11 support).
75+
* Currently requires a 64 bits environment.
6676
* 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).
6777
* The generic JSON value class, the main part of this library, is in [`include/tao/json/value.hpp`](include/tao/json/value.hpp).
6878
* 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

Comments
 (0)