Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f54b0e4

Browse files
authored
Merge pull request #714 from miloyip/version1.1.0
Version 1.1.0
2 parents ab791ae + 17254e0 commit f54b0e4

26 files changed

Lines changed: 162 additions & 57 deletions

CHANGELOG.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,12 @@ This project adheres to [Semantic Versioning](http://semver.org/).
44

55
## [Unreleased]
66

7+
## 1.1.0 - 2016-08-25
8+
79
### Added
810
* Add GenericDocument ctor overload to specify JSON type (#369)
911
* Add FAQ (#372, #373, #374, #376)
12+
* Add forward declaration header `fwd.h`
1013
* Add @PlatformIO Library Registry manifest file (#400)
1114
* Implement assignment operator for BigInteger (#404)
1215
* Add comments support (#443)
@@ -33,11 +36,15 @@ This project adheres to [Semantic Versioning](http://semver.org/).
3336
* Add parse-by-parts example (#556, #562)
3437
* Support parse number as string (#564, #589)
3538
* Add kFormatSingleLineArray for PrettyWriter (#577)
36-
* Added optional support for trailing commas #584
39+
* Added optional support for trailing commas (#584)
40+
* Added filterkey and filterkeydom examples (#615)
41+
* Added npm docs (#639)
42+
* Allow options for writing and parsing NaN/Infinity (#641)
43+
* Add std::string overload to PrettyWriter::Key() when RAPIDJSON_HAS_STDSTRING is defined (#698)
3744

3845
### Fixed
39-
* Fix gcc/clang/vc warnings (#350, #394, #397, #444, #447, #473, #515, #582, #589, #595)
40-
* Fix documentation (#482, #511, #550, #557)
46+
* Fix gcc/clang/vc warnings (#350, #394, #397, #444, #447, #473, #515, #582, #589, #595, #667)
47+
* Fix documentation (#482, #511, #550, #557, #614, #635, #660)
4148
* Fix emscripten alignment issue (#535)
4249
* Fix missing allocator to uses of AddMember in document (#365)
4350
* CMake will no longer complain that the minimum CMake version is not specified (#501)
@@ -56,14 +63,23 @@ This project adheres to [Semantic Versioning](http://semver.org/).
5663
* Fix a crash bug in regex (#605)
5764
* Fix schema "required" keyword cannot handle duplicated keys (#609)
5865
* Fix cmake CMP0054 warning (#612)
66+
* Added missing include guards in istreamwrapper.h and ostreamwrapper.h (#634)
67+
* Fix undefined behaviour (#646)
68+
* Fix buffer overrun using PutN (#673)
69+
* Fix rapidjson::value::Get<std::string>() may returns wrong data (#681)
70+
* Add Flush() for all value types (#689)
71+
* Handle malloc() fail in PoolAllocator (#691)
72+
* Fix builds on x32 platform. #703
5973

6074
### Changed
6175
* Clarify problematic JSON license (#392)
6276
* Move Travis to container based infrastructure (#504, #558)
6377
* Make whitespace array more compact (#513)
6478
* Optimize Writer::WriteString() with SIMD (#544)
6579
* x86-64 48-bit pointer optimization for GenericValue (#546)
66-
80+
* Define RAPIDJSON_HAS_CXX11_RVALUE_REFS directly in clang (#617)
81+
* Make GenericSchemaDocument constructor explicit (#674)
82+
* Optimize FindMember when use std::string (#690)
6783

6884
## [1.0.2] - 2015-05-14
6985

@@ -135,7 +151,8 @@ This project adheres to [Semantic Versioning](http://semver.org/).
135151

136152
## 0.1 - 2011-11-18
137153

138-
[Unreleased]: https://github.com/miloyip/rapidjson/compare/v1.0.2...HEAD
154+
[Unreleased]: https://github.com/miloyip/rapidjson/compare/v1.1.0...HEAD
155+
[1.1.0]: https://github.com/miloyip/rapidjson/compare/v1.0.2...v1.1.0
139156
[1.0.2]: https://github.com/miloyip/rapidjson/compare/v1.0.1...v1.0.2
140157
[1.0.1]: https://github.com/miloyip/rapidjson/compare/v1.0.0...v1.0.1
141158
[1.0.0]: https://github.com/miloyip/rapidjson/compare/v1.0-beta...v1.0.0

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules)
1212
PROJECT(RapidJSON CXX)
1313

1414
set(LIB_MAJOR_VERSION "1")
15-
set(LIB_MINOR_VERSION "0")
16-
set(LIB_PATCH_VERSION "2")
15+
set(LIB_MINOR_VERSION "1")
16+
set(LIB_PATCH_VERSION "0")
1717
set(LIB_VERSION_STRING "${LIB_MAJOR_VERSION}.${LIB_MINOR_VERSION}.${LIB_PATCH_VERSION}")
1818

1919
# compile in release with debug info mode by default

appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
os: Visual Studio 2015 CTP
2-
version: 1.0.2.{build}
2+
version: 1.1.0.{build}
33

44
configuration:
55
- Debug

doc/Doxyfile.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,7 @@ WARN_LOGFILE =
765765
# Note: If this tag is empty the current directory is searched.
766766

767767
INPUT = readme.md \
768+
CHANGELOG.md \
768769
include/rapidjson/rapidjson.h \
769770
include/ \
770771
doc/features.md \

doc/Doxyfile.zh-cn.in

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -765,6 +765,7 @@ WARN_LOGFILE =
765765
# Note: If this tag is empty the current directory is searched.
766766

767767
INPUT = readme.zh-cn.md \
768+
CHANGELOG.md \
768769
include/rapidjson/rapidjson.h \
769770
include/ \
770771
doc/features.zh-cn.md \

doc/dom.zh-cn.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# DOM
22

3-
文档对象模型(Document Object Model, DOM)是一种罝于内存中的 JSON 表示方式,以供查询及操作。我们己于 [教程](doc/tutorial.md) 中介绍了 DOM 的基本用法,本节将讲述一些细节及高级用法。
3+
文档对象模型(Document Object Model, DOM)是一种罝于内存中的 JSON 表示方式,以供查询及操作。我们己于 [教程](doc/tutorial.zh-cn.md) 中介绍了 DOM 的基本用法,本节将讲述一些细节及高级用法。
44

55
[TOC]
66

@@ -31,7 +31,7 @@ typedef GenericDocument<UTF8<> > Document;
3131
3232
## 编码 {#Encoding}
3333
34-
`Encoding` 参数指明在内存中的 JSON String 使用哪种编码。可行的选项有 `UTF8`、`UTF16`、`UTF32`。要注意这 3 个类型其实也是模板类。`UTF8<>` 等同 `UTF8<char>`,这代表它使用 `char` 来存储字符串。更多细节可以参考 [编码](encoding.md)。
34+
`Encoding` 参数指明在内存中的 JSON String 使用哪种编码。可行的选项有 `UTF8`、`UTF16`、`UTF32`。要注意这 3 个类型其实也是模板类。`UTF8<>` 等同 `UTF8<char>`,这代表它使用 `char` 来存储字符串。更多细节可以参考 [编码](doc/encoding.zh-cn.md)。
3535
3636
这里是一个例子。假设一个 Windows 应用软件希望查询存储于 JSON 中的本地化字符串。Windows 中含 Unicode 的函数使用 UTF-16(宽字符)编码。无论 JSON 文件使用哪种编码,我们都可以把字符串以 UTF-16 形式存储在内存。
3737
@@ -102,7 +102,7 @@ GenericDocument& GenericDocument::Parse(const Ch* str);
102102
GenericDocument& GenericDocument::Parse(const Ch* str);
103103
~~~~~~~~~~
104104
105-
[教程](tutorial.md) 中的例使用 (8) 去正常解析字符串。而 [流](stream.md) 的例子使用前 3 个函数。我们将稍后介绍原位(*In situ*) 解析。
105+
[教程](doc/tutorial.zh-cn.md) 中的例使用 (8) 去正常解析字符串。而 [流](doc/stream.zh-cn.md) 的例子使用前 3 个函数。我们将稍后介绍原位(*In situ*) 解析。
106106
107107
`parseFlags` 是以下位标置的组合:
108108
@@ -118,6 +118,7 @@ GenericDocument& GenericDocument::Parse(const Ch* str);
118118
`kParseCommentsFlag` | 容许单行 `// ...` 及多行 `/* ... */` 注释(放宽的 JSON 语法)。
119119
`kParseNumbersAsStringsFlag` | 把数字类型解析成字符串。
120120
`kParseTrailingCommasFlag` | 容许在对象和数组结束前含有逗号(放宽的 JSON 语法)。
121+
`kParseNanAndInfFlag` | 容许 `NaN`、`Inf`、`Infinity`、`-Inf` 及 `-Infinity` 作为 `double` 值(放宽的 JSON 语法)。
121122
122123
由于使用了非类型模板参数,而不是函数参数,C++ 编译器能为个别组合生成代码,以改善性能及减少代码尺寸(当只用单种特化)。缺点是需要在编译期决定标志。
123124
@@ -230,9 +231,9 @@ JSON string 会被打上 const-string 的标志。但它们可能并非真正的
230231
231232
## 转码与校验 {#TranscodingAndValidation}
232233
233-
RapidJSON 内部支持不同 Unicode 格式(正式的术语是 UCS 变换格式)间的转换。在 DOM 解析时,流的来源编码与 DOM 的编码可以不同。例如,来源流可能含有 UTF-8 的 JSON,而 DOM 则使用 UTF-16 编码。在 [EncodedInputStream](doc/stream.md) 一节里有一个例子。
234+
RapidJSON 内部支持不同 Unicode 格式(正式的术语是 UCS 变换格式)间的转换。在 DOM 解析时,流的来源编码与 DOM 的编码可以不同。例如,来源流可能含有 UTF-8 的 JSON,而 DOM 则使用 UTF-16 编码。在 [EncodedInputStream](doc/stream.zh-cn.md) 一节里有一个例子。
234235
235-
当从 DOM 输出一个 JSON 至输出流之时,也可以使用转码功能。在 [EncodedOutputStream](doc/stream.md) 一节里有一个例子。
236+
当从 DOM 输出一个 JSON 至输出流之时,也可以使用转码功能。在 [EncodedOutputStream](doc/stream.zh-cn.md) 一节里有一个例子。
236237
237238
在转码过程中,会把来源 string 解码成 Unicode 码点,然后把码点编码成目标格式。在解码时,它会校验来源 string 的字节序列是否合法。若遇上非合法序列,解析器会停止并返回 `kParseErrorStringInvalidEncoding` 错误。
238239
@@ -256,9 +257,9 @@ d.Accept(writer);
256257

257258
使用者可以创建自定义的处理器,去把 DOM 转换成其它格式。例如,一个把 DOM 转换成 XML 的处理器。
258259

259-
要知道更多关于 SAX 事件与处理器,可参阅 [SAX](doc/sax.md)
260+
要知道更多关于 SAX 事件与处理器,可参阅 [SAX](doc/sax.zh-cn.md)
260261

261-
## 使用者缓冲区{ #UserBuffer}
262+
## 使用者缓冲区 {#UserBuffer}
262263

263264
许多应用软件可能需要尽量减少内存分配。
264265

doc/encoding.zh-cn.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ typedef GenericDocument<UTF16<> > WDocument;
7979
typedef GenericValue<UTF16<> > WValue;
8080
~~~~~~~~~~
8181

82-
可以在 [DOM's Encoding](doc/stream.md) 一节看到更详细的使用例子。
82+
可以在 [DOM's Encoding](doc/stream.zh-cn.md) 一节看到更详细的使用例子。
8383

8484
## 字符类型 {#CharacterType}
8585

doc/faq.zh-cn.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,11 @@
8888

8989
4. 什么是原位(*in situ*)解析?
9090

91-
原位解析会把 JSON 字符串直接解码至输入的 JSON 中。这是一个优化,可减少内存消耗及提升性能,但输入的 JSON 会被更改。进一步细节请参考 [原位解析](doc/dom.md)
91+
原位解析会把 JSON 字符串直接解码至输入的 JSON 中。这是一个优化,可减少内存消耗及提升性能,但输入的 JSON 会被更改。进一步细节请参考 [原位解析](doc/dom.zh-cn.md)
9292

9393
5. 什么时候会产生解析错误?
9494

95-
当输入的 JSON 包含非法语法,或不能表示一个值(如 Number 太大),或解析器的处理器中断解析过程,解析器都会产生一个错误。详情请参考 [解析错误](doc/dom.md)
95+
当输入的 JSON 包含非法语法,或不能表示一个值(如 Number 太大),或解析器的处理器中断解析过程,解析器都会产生一个错误。详情请参考 [解析错误](doc/dom.zh-cn.md)
9696

9797
6. 有什么错误信息?
9898

@@ -171,7 +171,7 @@
171171

172172
2. 怎样去复制一个值?
173173

174-
有两个 API 可用:含 allocator 的构造函数,以及 `CopyFrom()`。可参考 [深复制 Value](doc/tutorial.md) 里的用例。
174+
有两个 API 可用:含 allocator 的构造函数,以及 `CopyFrom()`。可参考 [深复制 Value](doc/tutorial.zh-cn.md) 里的用例。
175175

176176
3. 为什么我需要提供字符串的长度?
177177

@@ -239,7 +239,7 @@
239239

240240
[字节顺序标记(byte order mark, BOM)](http://en.wikipedia.org/wiki/Byte_order_mark) 有时会出现于文件/流的开始,以表示其 UTF 编码类型。
241241

242-
RapidJSON 的 `EncodedInputStream` 可检测/跳过 BOM。`EncodedOutputStream` 可选择是否写入 BOM。可参考 [编码流](doc/stream.md) 中的例子。
242+
RapidJSON 的 `EncodedInputStream` 可检测/跳过 BOM。`EncodedOutputStream` 可选择是否写入 BOM。可参考 [编码流](doc/stream.zh-cn.md) 中的例子。
243243

244244
5. 为什么会涉及大端/小端?
245245

doc/features.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,16 @@
2020
## Standard compliance
2121

2222
* RapidJSON should be fully RFC4627/ECMA-404 compliance.
23+
* Support JSON Pointer (RFC6901).
24+
* Support JSON Schema Draft v4.
2325
* Support Unicode surrogate.
2426
* Support null character (`"\u0000"`)
2527
* For example, `["Hello\u0000World"]` can be parsed and handled gracefully. There is API for getting/setting lengths of string.
2628
* Support optional relaxed syntax.
2729
* Single line (`// ...`) and multiple line (`/* ... */`) comments (`kParseCommentsFlag`).
2830
* Trailing commas at the end of objects and arrays (`kParseTrailingCommasFlag`).
29-
* [NPM compliant](doc/npm.md).
31+
* `NaN`, `Inf`, `Infinity`, `-Inf` and `-Infinity` as `double` values (`kParseNanAndInfFlag`)
32+
* [NPM compliant](http://github.com/miloyip/rapidjson/blob/master/doc/npm.md).
3033

3134
## Unicode
3235

@@ -70,7 +73,7 @@
7073
* Only store pointer instead of copying
7174
* Optimization for "short" strings
7275
* Store short string in `Value` internally without additional allocation.
73-
* For UTF-8 string: maximum 11 characters in 32-bit, 15 characters in 64-bit.
76+
* For UTF-8 string: maximum 11 characters in 32-bit, 21 characters in 64-bit (13 characters in x86-64).
7477
* Optionally support `std::string` (define `RAPIDJSON_HAS_STDSTRING=1`)
7578

7679
## Generation
@@ -98,3 +101,4 @@
98101
* Some C++11 support (optional)
99102
* Rvalue reference
100103
* `noexcept` specifier
104+
* Range-based for loop

doc/features.zh-cn.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,16 @@
2020
## 符合标准
2121

2222
* RapidJSON 应完全符合 RFC4627/ECMA-404 标准。
23+
* 支持 JSON Pointer (RFC6901).
24+
* 支持 JSON Schema Draft v4.
2325
* 支持 Unicod 代理对(surrogate pair)。
2426
* 支持空字符(`"\u0000"`)。
2527
* 例如,可以优雅地解析及处理 `["Hello\u0000World"]`。含读写字符串长度的 API。
26-
* 支持放宽的可选语法
28+
* 支持可选的放宽语法
2729
* 单行(`// ...`)及多行(`/* ... */`) 注释 (`kParseCommentsFlag`)。
2830
* 在对象和数组结束前含逗号 (`kParseTrailingCommasFlag`)。
31+
* `NaN``Inf``Infinity``-Inf``-Infinity` 作为 `double` 值 (`kParseNanAndInfFlag`)
32+
* [NPM 兼容](https://github.com/miloyip/rapidjson/blob/master/doc/npm.md).
2933

3034
## Unicode
3135

@@ -68,7 +72,7 @@
6872
* 只储存指针,不作复制
6973
* 优化“短”字符串
7074
*`Value` 内储存短字符串,无需额外分配。
71-
* 对 UTF-8 字符串来说,32 位架构下可存储最多 11 字符,64 位下 15 字符。
75+
* 对 UTF-8 字符串来说,32 位架构下可存储最多 11 字符,64 位下 21 字符(x86-64 下 13 字符)
7276
* 可选地支持 `std::string`(定义 `RAPIDJSON_HAS_STDSTRING=1`
7377

7478
## 生成
@@ -96,3 +100,4 @@
96100
* 一些 C++11 的支持(可选)
97101
* 右值引用(rvalue reference)
98102
* `noexcept` 修饰符
103+
* 范围 for 循环

0 commit comments

Comments
 (0)