mirror of
https://github.com/simdjson/simdjson
synced 2026-06-08 17:27:07 +00:00
fix some typos (#2446)
This commit is contained in:
+2
-2
@@ -1395,7 +1395,7 @@ Car c = doc.get<Car>();
|
||||
|
||||
We try to automate the parsing of any given structure or class
|
||||
by looking at its non-static public members. At compile-time,
|
||||
the library looks at a simple structre like `Car` and
|
||||
the library looks at a simple structure like `Car` and
|
||||
maps it to parsing code. We call the default constructor,
|
||||
and then assign values to the public members.
|
||||
|
||||
@@ -1450,7 +1450,7 @@ struct complicated_weather_data {
|
||||
};
|
||||
```
|
||||
|
||||
The code might as simple as the following.
|
||||
The code might be as simple as the following.
|
||||
|
||||
```cpp
|
||||
auto padded = R"({"time":["2023-03-15T12:00:00Z"],"temperature":[42]})"_padded;
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ Parameters:
|
||||
- `append_raw(std::string_view input)`: Appends a string view directly to the JSON buffer without escaping.
|
||||
- `append_raw(const char *str, size_t len)`: Appends a specified number of characters from a C string directly to the JSON
|
||||
|
||||
After writting the content, if you have reasons to believe that the content might violate UTF-8 conventions, you can check it as follows:
|
||||
After writing the content, if you have reasons to believe that the content might violate UTF-8 conventions, you can check it as follows:
|
||||
|
||||
- `validate_unicode()`: Checks if the content in the JSON buffer is valid UTF-8. Returns: true if the content is valid UTF-8, false otherwise.
|
||||
|
||||
|
||||
+1
-1
@@ -129,7 +129,7 @@ Once you have an element, you can navigate it with idiomatic C++ iterators, oper
|
||||
The strings contain unescaped valid UTF-8 strings: no unmatched surrogate is allowed.
|
||||
Internally, numbers are stored as either 64-bit integers or 64-bit floating-point numbers.
|
||||
Thus it is possible to get the full 64-bit integer range (either signed or unsigned).
|
||||
By default, the string `-0` is parsed as the integer 0 as in Pytho or C++. If you set the macro
|
||||
By default, the string `-0` is parsed as the integer 0 as in Python or C++. If you set the macro
|
||||
`SIMDJSON_MINUS_ZERO_AS_FLOAT` to `1` when building simdjson, you can get that `-0` is mapped to `-0.0`
|
||||
as in JavaScript. You can get the desired effect by building simdjson with cmake setting the
|
||||
`SIMDJSON_MINUS_ZERO_AS_FLOAT` to on: `cmake -B build -D SIMDJSON_MINUS_ZERO_AS_FLOAT=ON`.
|
||||
|
||||
Reference in New Issue
Block a user