Skip to content

Commit 17ae6ff

Browse files
authored
Merge pull request Tencent#1110 from martinlindhe/master
fix some typos
2 parents 5aa79b7 + 8684c99 commit 17ae6ff

File tree

9 files changed

+16
-16
lines changed

9 files changed

+16
-16
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
140140
* Redo all documentation (English, Simplified Chinese)
141141

142142
### Changed
143-
* Copyright ownership transfered to THL A29 Limited (a Tencent company).
143+
* Copyright ownership transferred to THL A29 Limited (a Tencent company).
144144
* Migrating from Premake to CMAKE (#192)
145145
* Resolve all warning reports
146146

doc/dom.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ Some techniques about using DOM API is discussed here.
241241
242242
## DOM as SAX Event Publisher
243243
244-
In RapidJSON, stringifying a DOM with `Writer` may be look a little bit weired.
244+
In RapidJSON, stringifying a DOM with `Writer` may be look a little bit weird.
245245
246246
~~~~~~~~~~cpp
247247
// ...

doc/encoding.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The earlier [RFC4627](http://www.ietf.org/rfc/rfc4627.txt) stated that,
1010
1111
> (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.
1212
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/)).
1414

1515
[TOC]
1616

doc/faq.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@
116116
~~~~~~~~~~cpp
117117
Value(kObjectType).Swap(d);
118118
~~~~~~~~~~
119-
or equivalent, but sightly longer to type:
119+
or equivalent, but slightly longer to type:
120120
~~~~~~~~~~cpp
121121
d.Swap(Value(kObjectType).Move());
122122
~~~~~~~~~~
@@ -140,11 +140,11 @@
140140
}
141141
~~~~~~~~~~
142142

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.
144144

145145
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:
146146
~~~~~~~~~~cpp
147-
Documnet address(person.GetAllocator());
147+
Document address(person.GetAllocator());
148148
...
149149
person["person"].AddMember("address", address["address"], person.GetAllocator());
150150
~~~~~~~~~~
@@ -174,7 +174,7 @@ Alternatively, if we don't want to explicitly refer to the root value of `addres
174174

175175
3. Why do I need to provide the length of string?
176176

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.
178178

179179
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.
180180

@@ -204,7 +204,7 @@ Alternatively, if we don't want to explicitly refer to the root value of `addres
204204

205205
2. Can it validate the encoding?
206206

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.
208208

209209
3. What is surrogate pair? Does RapidJSON support it?
210210

@@ -248,7 +248,7 @@ Alternatively, if we don't want to explicitly refer to the root value of `addres
248248

249249
1. Is RapidJSON really fast?
250250

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.
252252

253253
2. Why is it fast?
254254

@@ -262,13 +262,13 @@ Alternatively, if we don't want to explicitly refer to the root value of `addres
262262

263263
The design of RapidJSON aims at reducing memory footprint.
264264

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.
266266

267267
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.
268268

269269
5. What is the purpose of being high performance?
270270

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.
272272

273273
## Gossip
274274

doc/performance.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Performance
22

3-
There is a [native JSON benchmark collection] [1] which evaluates speed, memory usage and code size of various operations among 37 JSON libaries.
3+
There is a [native JSON benchmark collection] [1] which evaluates speed, memory usage and code size of various operations among 37 JSON libraries.
44

55
[1]: https://github.com/miloyip/nativejson-benchmark
66

doc/pointer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ p.Stringify(sb);
211211
std::cout << sb.GetString() << std::endl;
212212
~~~
213213
214-
It can also stringify to URI fragment reprsentation by `StringifyUriFragment()`.
214+
It can also stringify to URI fragment representation by `StringifyUriFragment()`.
215215
216216
# User-Supplied Tokens {#UserSuppliedTokens}
217217

doc/sax.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ When the `Reader` encounters a JSON number, it chooses a suitable C++ type mappi
126126

127127
When the `Reader` encounters the beginning of an object, it calls `StartObject()`. An object in JSON is a set of name-value pairs. If the object contains members it first calls `Key()` for the name of member, and then calls functions depending on the type of the value. These calls of name-value pairs repeat until calling `EndObject(SizeType memberCount)`. Note that the `memberCount` parameter is just an aid for the handler; users who do not need this parameter may ignore it.
128128

129-
Arrays are similar to objects, but simpler. At the beginning of an array, the `Reader` calls `BeginArary()`. If there is elements, it calls functions according to the types of element. Similarly, in the last call `EndArray(SizeType elementCount)`, the parameter `elementCount` is just an aid for the handler.
129+
Arrays are similar to objects, but simpler. At the beginning of an array, the `Reader` calls `BeginArray()`. If there is elements, it calls functions according to the types of element. Similarly, in the last call `EndArray(SizeType elementCount)`, the parameter `elementCount` is just an aid for the handler.
130130

131131
Every handler function returns a `bool`. Normally it should return `true`. If the handler encounters an error, it can return `false` to notify the event publisher to stop further processing.
132132

doc/schema.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ if (!d.Accept(validator)) {
4949
5050
Some notes:
5151
52-
* One `SchemaDocment` can be referenced by multiple `SchemaValidator`s. It will not be modified by `SchemaValidator`s.
52+
* One `SchemaDocument` can be referenced by multiple `SchemaValidator`s. It will not be modified by `SchemaValidator`s.
5353
* A `SchemaValidator` may be reused to validate multiple documents. To run it for other documents, call `validator.Reset()` first.
5454
5555
# Validation during parsing/serialization {#ParsingSerialization}

doc/tutorial.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ printf("t = %s\n", document["t"].GetBool() ? "true" : "false");
6868
t = true
6969
~~~~~~~~~~
7070
71-
JSON null can be queryed with `IsNull()`.
71+
JSON null can be queried with `IsNull()`.
7272
~~~~~~~~~~cpp
7373
printf("n = %s\n", document["n"].IsNull() ? "null" : "?");
7474
~~~~~~~~~~

0 commit comments

Comments
 (0)