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: doc/dom.md
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -128,7 +128,7 @@ And the `InputStream` is type of input stream.
128
128
129
129
## Parse Error {#ParseError}
130
130
131
-
When the parse processing succeeded, the `Document` contains the parse results. When there is an error, the original DOM is *unchanged*. And the error state of parsing can be obtained by `bool HasParseError()`, `ParseErrorCode GetParseError()` and `size_t GetParseOffset()`.
131
+
When the parse processing succeeded, the `Document` contains the parse results. When there is an error, the original DOM is *unchanged*. And the error state of parsing can be obtained by `bool HasParseError()`, `ParseErrorCode GetParseError()` and `size_t GetErrorOffset()`.
Copy file name to clipboardExpand all lines: doc/encoding.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ The earlier [RFC4627](http://www.ietf.org/rfc/rfc4627.txt) stated that,
10
10
11
11
> (in §6) JSON may be represented using UTF-8, UTF-16, or UTF-32. When JSON is written in UTF-8, JSON is 8bit compatible. When JSON is written in UTF-16 or UTF-32, the binary content-transfer-encoding must be used.
12
12
13
-
RapidJSON supports various encodings. It can also validate the encodings of JSON, and transconding JSON among encodings. All these features are implemented internally, without the need for external libraries (e.g. [ICU](http://site.icu-project.org/)).
13
+
RapidJSON supports various encodings. It can also validate the encodings of JSON, and transcoding JSON among encodings. All these features are implemented internally, without the need for external libraries (e.g. [ICU](http://site.icu-project.org/)).
Copy file name to clipboardExpand all lines: doc/faq.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -116,7 +116,7 @@
116
116
~~~~~~~~~~cpp
117
117
Value(kObjectType).Swap(d);
118
118
~~~~~~~~~~
119
-
or equivalent, but sightly longer to type:
119
+
or equivalent, but slightly longer to type:
120
120
~~~~~~~~~~cpp
121
121
d.Swap(Value(kObjectType).Move());
122
122
~~~~~~~~~~
@@ -140,11 +140,11 @@
140
140
}
141
141
~~~~~~~~~~
142
142
143
-
The most important requirement to take care of document and value life-cycle as well as consistent memory managent using the right allocator during the value transfer.
143
+
The most important requirement to take care of document and value life-cycle as well as consistent memory management using the right allocator during the value transfer.
144
144
145
145
Simple yet most efficient way to achieve that is to modify the `address` definition above to initialize it with allocator of the `person` document, then we just add the root member of the value:
@@ -174,7 +174,7 @@ Alternatively, if we don't want to explicitly refer to the root value of `addres
174
174
175
175
3. Why do I need to provide the length of string?
176
176
177
-
Since C string is null-terminated, the length of string needs to be computed via `strlen()`, with linear runtime complexity. This incurs an unncessary overhead of many operations, if the user already knows the length of string.
177
+
Since C string is null-terminated, the length of string needs to be computed via `strlen()`, with linear runtime complexity. This incurs an unnecessary overhead of many operations, if the user already knows the length of string.
178
178
179
179
Also, RapidJSON can handle `\u0000` (null character) within a string. If a string contains null characters, `strlen()` cannot return the true length of it. In such case user must provide the length of string explicitly.
180
180
@@ -204,7 +204,7 @@ Alternatively, if we don't want to explicitly refer to the root value of `addres
204
204
205
205
2. Can it validate the encoding?
206
206
207
-
Yes, just pass `kParseValidateEncodingFlag` to `Parse()`. If there is invalid encoding in the stream, it wil generate `kParseErrorStringInvalidEncoding` error.
207
+
Yes, just pass `kParseValidateEncodingFlag` to `Parse()`. If there is invalid encoding in the stream, it will generate `kParseErrorStringInvalidEncoding` error.
208
208
209
209
3. What is surrogate pair? Does RapidJSON support it?
210
210
@@ -248,7 +248,7 @@ Alternatively, if we don't want to explicitly refer to the root value of `addres
248
248
249
249
1. Is RapidJSON really fast?
250
250
251
-
Yes. It may be the fastest open source JSON library. There is a [benchmark](https://github.com/miloyip/nativejson-benchmark) for evaluating performance of C/C++ JSON libaries.
251
+
Yes. It may be the fastest open source JSON library. There is a [benchmark](https://github.com/miloyip/nativejson-benchmark) for evaluating performance of C/C++ JSON libraries.
252
252
253
253
2. Why is it fast?
254
254
@@ -262,13 +262,13 @@ Alternatively, if we don't want to explicitly refer to the root value of `addres
262
262
263
263
The design of RapidJSON aims at reducing memory footprint.
264
264
265
-
In the SAX API, `Reader` consumes memory portional to maximum depth of JSON tree, plus maximum length of JSON string.
265
+
In the SAX API, `Reader` consumes memory proportional to maximum depth of JSON tree, plus maximum length of JSON string.
266
266
267
267
In the DOM API, each `Value` consumes exactly 16/24 bytes for 32/64-bit architecture respectively. RapidJSON also uses a special memory allocator to minimize overhead of allocations.
268
268
269
269
5. What is the purpose of being high performance?
270
270
271
-
Some applications need to process very large JSON files. Some server-side applications need to process huge amount of JSONs. Being high performance can improve both latency and throuput. In a broad sense, it will also save energy.
271
+
Some applications need to process very large JSON files. Some server-side applications need to process huge amount of JSONs. Being high performance can improve both latency and throughput. In a broad sense, it will also save energy.
0 commit comments