Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
R
rapidjson
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
rapidjson
Commits
006533cd
Commit
006533cd
authored
Apr 15, 2016
by
Milo Yip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added documentation about kParseTrailingCommasFlag
parent
6bc606c9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
dom.zh-cn.md
doc/dom.zh-cn.md
+1
-0
features.md
doc/features.md
+2
-1
features.zh-cn.md
doc/features.zh-cn.md
+2
-1
No files found.
doc/dom.zh-cn.md
View file @
006533cd
...
...
@@ -116,6 +116,7 @@ GenericDocument& GenericDocument::Parse(const Ch* str);
`kParseStopWhenDoneFlag`
| 当从流解析了一个完整的JSON根节点之后,停止继续处理余下的流。当使用了此标志,解析器便不会产生
`kParseErrorDocumentRootNotSingular`
错误。可使用本标志去解析同一个流里的多个JSON。
`kParseFullPrecisionFlag`
| 使用完整的精确度去解析数字(较慢)。如不设置此标节,则会使用正常的精确度(较快)。正常精确度会有最多3个
[
ULP
](
http://en.wikipedia.org/wiki/Unit_in_the_last_place
)
的误差。
`kParseCommentsFlag`
| 容许单行
`// ...`
及多行
`/* ... */`
注释(放宽的JSON语法)。
`kParseTrailingCommasFlag`
| 容许在对象和数组结束前含有逗号(放宽的JSON语法)。
由于使用了非类型模板参数,而不是函数参数,C++编译器能为个别组合生成代码,以改善性能及减少代码尺寸(当只用单种特化)。缺点是需要在编译期决定标志。
...
...
doc/features.md
View file @
006533cd
...
...
@@ -24,7 +24,8 @@
*
Support null character (
`"\u0000"`
)
*
For example,
`["Hello\u0000World"]`
can be parsed and handled gracefully. There is API for getting/setting lengths of string.
*
Support optional relaxed syntax.
*
Single line (
`// ...`
) and multiple line (
`/* ... */`
) comments.
*
Single line (
`// ...`
) and multiple line (
`/* ... */`
) comments (
`kParseCommentsFlag`
).
*
Trailing commas at the end of objects and arrays (
`kParseTrailingCommasFlag`
).
## Unicode
...
...
doc/features.zh-cn.md
View file @
006533cd
...
...
@@ -24,7 +24,8 @@
*
支持空字符(
`"\u0000"`
)。
*
例如,可以优雅地解析及处理
`["Hello\u0000World"]`
。含读写字符串长度的API。
*
支持放宽的可选语法
*
单行(
`// ...`
)及多行(
`/* ... */`
) 注释。
*
单行(
`// ...`
)及多行(
`/* ... */`
) 注释(
`kParseCommentsFlag`
)。
*
在对象和数组结束前含逗号(
`kParseTrailingCommasFlag`
)。
## Unicode
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment