From 6687ea1a36d2fa0d17fd7385f6489095d8c23a6f Mon Sep 17 00:00:00 2001 From: Niels Date: Mon, 29 Dec 2014 18:19:06 +0100 Subject: [PATCH] updated reference --- Reference.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/Reference.md b/Reference.md index 4846302d..4110aae8 100644 --- a/Reference.md +++ b/Reference.md @@ -24,12 +24,12 @@ There are only a few type conversions possible: JSON values can be created from many literals and variable types: -| JSON type | literal/variable types | -| --------- | ---------------------- | -| none | `nullptr` literal, `nullptr_t` type, no value | -| string | string literal, `char*` type, `std::string` type, `std::string&&` rvalue reference, `JSON::string_t` type | -| number (integer) | integer literal, `int` type, `JSON_number_t` type | -| number (floating point) | floating point literal, `double` type, `JSON::number_float_t` type | -| array | initializer list whose elements are `JSON` values (or can be translated into `JSON` values using the rules above), `std::vector` type, `JSON::array_t` type | -| object | initializer list whose elements are pairs of a string literal and a `JSON` value (or can be translated into `JSON` values using the rules above), `std::map` type, `JSON::object_t` type | - +| JSON type | literal/variable types | examples | +| --------- | ---------------------- | -------- | +| none | null pointer literal, `nullptr_t` type, no value | `nullptr` | +| boolean | boolean literals, `bool` type, `JSON::boolean_t` type | `true`, `false` | +| string | string literal, `char*` type, `std::string` type, `std::string&&` rvalue reference, `JSON::string_t` type | `"Hello"` | +| number (integer) | integer literal, `short int` type, `int` type, `JSON_number_t` type | `42` | +| number (floating point) | floating point literal, `float` type, `double` type, `JSON::number_float_t` type | `3.141529` +| array | initializer list whose elements are `JSON` values (or can be translated into `JSON` values using the rules above), `std::vector` type, `JSON::array_t` type | `{1, 2, 3, true, "foo"}` | +| object | initializer list whose elements are pairs of a string literal and a `JSON` value (or can be translated into `JSON` values using the rules above), `std::map` type, `JSON::object_t` type | { {"key1", 42}, {"key2", false} } |