1435 Commits

Author SHA1 Message Date
Wenhao Liu
06f62e38f7 fix typos and dead links, sync faq.zh-cn.md 2015-11-29 00:12:29 +08:00
Wenhao Liu
fe89676a9e fix a compatibility issue with doxygen 2015-11-28 22:40:43 +08:00
Milo Yip
9d47c62337 Merge pull request #480 from pah/feature/document-parseresult
GenericDocument: add implicit conversion to ParseResult
2015-11-27 10:42:11 +08:00
Philipp A. Hartmann
9378001e35 documenttest.cpp: check/use conversion from Document to ParseResult 2015-11-26 22:33:14 +01:00
Philipp A. Hartmann
98959e2820 GenericDocument: add implicit conversion to ParseResult
To simplify the error handling, this commit adds an implicit conversion
of GenericDocument to ParseResult, allowing code like (already in the
documentation):

   ParseResult ok = doc.Parse(json);
   if (!ok) // ...
2015-11-26 22:30:59 +01:00
Milo Yip
8ec389f167 Merge pull request #478 from haubi/master
fix Document::Parse(const Ch*) for transcoding
2015-11-26 09:16:07 +08:00
Michael Haubenwallner
07672da098 fix Document::Parse(const Ch*) for transcoding
To allow for an UTF16-Document to Parse(UTF8),
the Parse() argument has to be UTF8-compatible.
2015-11-25 19:45:47 +01:00
Milo Yip
292714e64a Merge pull request #470 from pah/fix/469-expect-throw-after-move
documenttest.cpp: EXPECT_THROW when checking empty allocator (closes #469)
2015-11-17 10:11:59 +08:00
Philipp A. Hartmann
c8d298bc9e documenttest.cpp: EXPECT_THROW when checking empty allocator (closes #469)
In the MoveConstructor/MoveAssignment tests, a check for a `NULL` allocator
return has been used to check for the correct moved-from state of a Document.
After the merge of #426, the GetAllocator call fails with an assertion,
if the allocator of a GenericDocument is NULL.

Check for the throw, instead of NULL in the move-related tests.
Tested with GCC 4.9 on Linux with C++11 enabled.

Reported-by: @woldendans
2015-11-16 21:32:09 +01:00
Milo Yip
b39a898269 Merge pull request #460 from stunney/master
Adding coapp definition
2015-10-30 09:32:08 -07:00
stunney
dceb7bed94 Usage comment
Adding usage comment at the top of the file for knowledge sharing
2015-10-29 14:02:12 -04:00
stunney
d6912d07cd Updating LicenseURL based on @miloyip 's suggestion
https://github.com/miloyip/rapidjson/pull/460#issuecomment-152232015
2015-10-29 13:53:42 -04:00
stunney
c6cb74bff8 Adding coapp definition
To create a nupkg, call CoApp's Write-NuGetPackage .\rapidjson.autopkg
-defines:MYVERSION=1.0.2 (or whatever version you want to call it)
2015-10-29 11:57:56 -04:00
Milo Yip
82329825c3 Fixes full-width spaces 2015-10-28 15:57:13 -07:00
Milo Yip
e602aab7f4 Fix language for pointer 2015-10-27 14:34:35 -07:00
Milo Yip
5512ec30f1 Add Chinese pointer guide to doxygen 2015-10-27 13:36:36 -07:00
Milo Yip
d5d17b96c2 Chinese Translation of JSON Pointer guide and minor English version modification. 2015-10-27 13:22:19 -07:00
Milo Yip
b761f0daea Merge pull request #441 from spl/patch-1
Highlight main features in bold
2015-10-26 12:24:29 +08:00
Milo Yip
aeb5f5671d Merge pull request #442 from FrankHB/patch-1
Fixed typo
2015-10-26 12:23:57 +08:00
Milo Yip
76d729e9c0 Add kParseCommentsFlag documentation 2015-10-22 10:58:58 +08:00
Milo Yip
54eb069f06 Merge pull request #450 from etiennebatise/missing-return-statement
Add missing return statement, fix #448
2015-10-15 17:32:59 +08:00
etiennebatise
edd077f4bf Add missing return statement, fix #448 2015-10-15 10:29:56 +02:00
Milo Yip
1a4cce275d Merge pull request #447 from etiennebatise/missing-breaks-at-switch-statements
Add break at default switch case statements fix #444
2015-10-15 11:19:55 +08:00
etiennebatise
74a021346d Add break at default switch case statements
fix issue #444
2015-10-14 15:46:26 +02:00
Milo Yip
a5d9971a06 Merge pull request #443 from andrusha97/master
Introduce comments support
2015-10-14 12:16:10 +08:00
Andrey
f7960ac0e8 Comments parsing fixes.
* Comments parsing function correctly handles EOF.
* Since SkipWhitespaceAndComments can generate errors, its calls should be followed by RAPIDJSON_PARSE_ERROR_EARLY_RETURN macro.
* Some tests to make the bug never appear again.
2015-10-14 00:04:29 +03:00
Andrey
5ce78b135d Introduce support of comments. 2015-10-11 15:09:58 +03:00
FrankHB
1640ce613c Fixed typo
<algorith> should be <algorithm>.
2015-10-10 11:33:48 +08:00
Sean Leather
481ae5b11d Highlight main features in bold
Might help some people see things better when skimming.
2015-10-09 14:29:30 +02:00
Milo Yip
1c76070520 Merge pull request #439 from pah/fix/437-keep-value-on-error
Keep Document value unchanged on parse error, fixes #437
2015-10-08 09:24:55 +08:00
Philipp A. Hartmann
41dd68f092 add simple test for unchanged DOM after parse error 2015-10-07 21:50:14 +02:00
Philipp A. Hartmann
fa123699d3 Keep Document value unchanged on parse error, fixes #437
Keeping the DOM unchanged in case of an error is the intended
behaviour according to the [documentation] [1].

Instead of forcing the value to `kNullType` before starting the
parsing, store the parsed value upon success via regular move.

[1]: https://miloyip.github.io/rapidjson/md_doc_dom.html#ParseError
2015-10-07 21:48:39 +02:00
Milo Yip
221887d682 Merge pull request #426 from malirod/fix-ub-in-document
Fix UB in GenericDocument::ParseStream
2015-09-19 19:33:21 +08:00
Rodion Malinovsky
2e11498943 Fix the usage of the stack::GetAllocator 2015-09-16 14:54:38 +03:00
Rodion Malinovsky
c7433dfc5e Add stack::HasAllocator
To check is it possible to expose allocator.
2015-09-16 14:53:51 +03:00
Rodion Malinovsky
8604ba0f1c Add asserts to prevent UB 2015-09-16 14:53:12 +03:00
Milo Yip
539e57225b Merge pull request #421 from simplifi/fwrite_return_check
check return of fwrite to avoid warn_unused_result build failures. Fixed #420. Thank you.
2015-09-03 12:06:18 +08:00
Kurt Johnson
2a267ff15a check return of fwrite to avoid warn_unused_result build failures 2015-09-02 09:29:15 -05:00
Milo Yip
d636594c97 Merge pull request #419 from miloyip/issue418_alignment
Fix incorrect 64-bit alignment
2015-09-01 10:35:35 +08:00
Milo Yip
311b48224f Try to fix incorrect 64-bit alignment
Added unit tests for alignment macros.
Fixes #418
2015-09-01 10:05:33 +08:00
Milo Yip
74f0673dad Merge branch 'master' into schema 2015-09-01 09:32:29 +08:00
Milo Yip
3ede21c356 Merge pull request #409 from pah/fix/biginteger-self-assign
BigInteger: guard against self-assignment
2015-08-14 10:07:18 +08:00
Philipp A. Hartmann
afbc0406f0 BigInteger: guard against self-assignment
Related-to: #404.
Suggested-by: @cosinekitty
2015-08-13 23:07:30 +02:00
Milo Yip
3cf7228f46 Port documentation fix from #407 2015-08-13 10:16:19 +08:00
Milo Yip
3517aca39a Merge pull request #407 from fcharlie/master
doc: 自定义流应当使用 ParseStream 而不是 Parse
2015-08-13 10:13:30 +08:00
Force.Charlie-I
ffd389befc 自定义流应当使用 ParseStream 而不是 Parse 2015-08-12 18:38:13 +08:00
Milo Yip
bc4551b5b0 Merge pull request #405 from ziyangli/patch-1
added missing fields of CMakeList.txt
2015-08-10 18:48:51 +08:00
Ziyang LI
4569752903 added missing fields of CMakeList.txt
this fixed cmake error for me
2015-08-10 18:11:25 +08:00
Milo Yip
8498c785a6 Merge pull request #404 from blackball/master
Implement = operator for BigInteger
2015-08-07 17:53:35 +08:00
blackball
c0854473e9 Implement = operator for BigInteger
There's a copy constructor, but no '=' operator implemented. This is dangerous.
2015-08-07 10:04:45 +02:00