Skip to content

Commit 0942dc0

Browse files
authored
This fixes a typo and makes the types more explicit (simdjson#1241)
1 parent 0d6919d commit 0942dc0

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

doc/basics.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ Once you have an element, you can navigate it with idiomatic C++ iterators, oper
129129
* **Extracting Values (with exceptions):** You can cast a JSON element to a native type: `double(element)` or
130130
`double x = json_element`. This works for double, uint64_t, int64_t, bool,
131131
dom::object and dom::array. An exception is thrown if the cast is not possible.
132-
* **Extracting Values (without expceptions):** You can use a variant usage of `get()` with error codes to avoid exceptions. You first declare the variable of the appropriate type (`double`, `uint64_t`, `int64_t`, `bool`,
132+
* **Extracting Values (without exceptions):** You can use a variant usage of `get()` with error codes to avoid exceptions. You first declare the variable of the appropriate type (`double`, `uint64_t`, `int64_t`, `bool`,
133133
`dom::object` and `dom::array`) and pass it by reference to `get()` which gives you back an error code: e.g.,
134134
```c++
135135
simdjson::error_code error;
@@ -152,11 +152,11 @@ Once you have an element, you can navigate it with idiomatic C++ iterators, oper
152152
* **Array and Object size** Given an array or an object, you can get its size (number of elements or keys)
153153
with the `size()` method.
154154
* **Checking an Element Type:** You can check an element's type with `element.type()`. It
155-
returns an `element_type`.
155+
returns an `element_type` with values such as `simdjson::dom::element_type::ARRAY`, `simdjson::dom::element_type::OBJECT`, `simdjson::dom::element_type::INT64`, `simdjson::dom::element_type::UINT64`,`simdjson::dom::element_type::DOUBLE`, `simdjson::dom::element_type::BOOL` or, `simdjson::dom::element_type::NULL_VALUE`.
156156
* **Output to streams and strings:** Given a document or an element (or node) out of a JSON document, you can output a minified string version using the C++ stream idiom (`out << element`). You can also request the construction of a minified string version (`simdjson::minify(element)`).
157157
158158
159-
Here are some examples of all of the above:
159+
The following code illustrates all of the above:
160160
161161
```c++
162162
auto cars_json = R"( [

doc/basics_doxygen.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ Once you have an element, you can navigate it with idiomatic C++ iterators, oper
110110
* **Extracting Values (with exceptions):** You can cast a JSON element to a native type: `double(element)` or
111111
`double x = json_element`. This works for double, uint64_t, int64_t, bool,
112112
dom::object and dom::array. An exception is thrown if the cast is not possible.
113-
* **Extracting Values (without expceptions):** You can use a variant usage of `get()` with error codes to avoid exceptions. You first declare the variable of the appropriate type (`double`, `uint64_t`, `int64_t`, `bool`,
113+
* **Extracting Values (without exceptions):** You can use a variant usage of `get()` with error codes to avoid exceptions. You first declare the variable of the appropriate type (`double`, `uint64_t`, `int64_t`, `bool`,
114114
`dom::object` and `dom::array`) and pass it by reference to `get()` which gives you back an error code: e.g.,
115115
```
116116
simdjson::error_code error;
@@ -133,11 +133,11 @@ Once you have an element, you can navigate it with idiomatic C++ iterators, oper
133133
* **Array and Object size** Given an array or an object, you can get its size (number of elements or keys)
134134
with the `size()` method.
135135
* **Checking an Element Type:** You can check an element's type with `element.type()`. It
136-
returns an `element_type`.
136+
returns an `element_type` with values such as `simdjson::dom::element_type::ARRAY`, `simdjson::dom::element_type::OBJECT`, `simdjson::dom::element_type::INT64`, `simdjson::dom::element_type::UINT64`,`simdjson::dom::element_type::DOUBLE`, `simdjson::dom::element_type::BOOL` or, `simdjson::dom::element_type::NULL_VALUE`.
137137
* **Output to Streams and Strings:** Given a document or an element (or node) out of a JSON document, you can output a minified string version using the C++ stream idiom (`out << element`). You can also request the construction of a minified string version (`simdjson::minify(element)`).
138138

139139

140-
Here are some examples of all of the above:
140+
The following code illustrates all of the above:
141141

142142
```
143143
auto cars_json = R"( [

0 commit comments

Comments
 (0)