Milo Yip
10924e389c
Fixes parsing small floating point values underflow
...
https://code.google.com/p/rapidjson/issues/detail?id=75
The modification is slightly different from dlbattle123 to improve
speed.
2014-06-30 21:26:43 +08:00
miloyip
389fe87cd8
Merge branch 'master' into issue23errorcode
...
Conflicts:
example/condense/condense.cpp
include/rapidjson/reader.h
test/unittest/readertest.cpp
2014-06-30 09:44:24 +08:00
Milo Yip
8e76a9dcce
Fixes compilation error
...
need ‘typename’ before
‘rapidjson::StreamTraits<InputStream>::StreamCopyType
2014-06-29 21:24:15 +08:00
Milo Yip
bcf7cee788
Add stream copying optimization switch depending stream type.
...
An unit test is added
2014-06-29 20:59:01 +08:00
Milo Yip
1d14748bc9
Added overloaded functions for default parseFlags
...
Can write d.Parse(...) instead of d.Parse<0>(...)
Hope to reduce strangeness and confusion for beginner.
2014-06-29 15:03:38 +08:00
Milo Yip
69ca7487bc
Manually merge the segfault fix from main branch and fix several unit tests about error code
2014-06-27 22:27:18 +08:00
Milo Yip
b0059483c8
Error can only be assigned once
2014-06-27 22:13:02 +08:00
Philipp A. Hartmann
be01d3d7cc
fix build on travis-ci.org
...
Some early returns were missing after the removal of longjmp in #22 .
This has led to segfaults on Linux (confirmed locally).
2014-06-27 10:26:37 +02:00
Milo Yip
b4df717675
Fixes grammar mistakes in error messages.
2014-06-27 16:13:54 +08:00
Milo Yip
3693d61f5a
Add parse error codes and API for converting error code to text.
...
Parse errors is represented as enum type `ParseErrorCode`.
Error texts are optional for user.
Added `GetParseError_En()` in `error/en.h`, user can localize this file
into other files. User may dynamically change the locale in runtime.
2014-06-27 01:53:56 +08:00
Milo Yip
a1a8abd0d9
Add safe checks in parsing compound types.
...
Compound types (object and array) call ParseString() and ParseValue()
for key and values. If there is parse errors inside those calls, it
should stop continue parsing. Otherwise, it may be possible to continue
parsing and calling handler incorrectly.
For example, in ["a\u,","b"], \u generates an error (it should follow
but 4 hex digits), the parser continues to treat the first comma as
element separator, and treat "," as a JSON string and call the handler.
It may be unacceptable in the application code.
2014-06-26 23:35:13 +08:00
Milo Yip
3d9dd745a1
Remove setjmp header and jmpbuf member variable
2014-06-26 23:24:16 +08:00
Milo Yip
188b99b471
Clear the stack after parsing and fixes indentation.
2014-06-26 23:14:05 +08:00
Milo Yip
74a24377a8
Remove setjmp()/longjmp()
2014-06-26 22:31:54 +08:00
Milo Yip
609381fc2e
Fixed some clang -Weverything warnings.
2014-06-25 23:14:32 +08:00
Milo Yip
f930d9e2e5
Revert "Remove some clang -Weverything warnings."
...
This reverts commit e4ffa48a7563e892047c27f0a50fdeb6f71e6b8b.
2014-06-25 16:07:44 +08:00
Milo Yip
e4ffa48a75
Remove some clang -Weverything warnings.
2014-06-25 16:06:00 +08:00
miloyip@gmail.com
9c68ce986e
Fixed a lots of vc2008/vs2010 and gcc3/4 warnings with the maximum warning level.
...
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@67 c5894555-1306-4e8d-425f-1f6f381ee07c
2012-11-13 08:02:22 +00:00
miloyip@gmail.com
8668aebf66
Fixed issue 17 from 0.1x branch
...
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@59 c5894555-1306-4e8d-425f-1f6f381ee07c
2012-02-28 06:07:32 +00:00
miloyip@gmail.com
bedeb0d8ea
Fixed issue 6: range check bug
...
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@51 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-12-06 04:28:36 +00:00
miloyip@gmail.com
7c914a9d4c
Added RAPIDJSON_STATIC_ASSERT() and applied it to check size of character types in encodings.
...
Modified API documentation to previous changes.
Rename Stream to InputStream/OutputStream/InputByteStream/OutputByteStream, and stream to is/os according to the context.
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@49 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-12-03 09:57:17 +00:00
miloyip@gmail.com
5eac448955
Added EncodedInputStream, AutoUTFInputStream, AutoUTF
...
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@40 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-11-29 18:39:03 +00:00
miloyip@gmail.com
a8d631fbc2
Added Transcoder for converting Encoding during parsing.
...
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@39 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-11-28 09:30:32 +00:00
miloyip@gmail.com
bdf6da641e
Refactor GenericReader::ParseString(). Extract logic independent of kParseInsituFlag to GenericReader::ParseStringToStream(). Eliminated RAPIDJSON_PUT() macro and made the function more readable.
...
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@38 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-11-27 15:18:12 +00:00
miloyip@gmail.com
827de60fb8
Cleanup Reader code
...
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@34 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-11-23 16:32:15 +00:00
miloyip@gmail.com
25eeff24f3
Refactor encoding concept to use stream for encoding and validation.
...
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@32 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-11-23 09:46:14 +00:00
miloyip@gmail.com
f198c486ee
Added encoding validation feature
...
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@30 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-11-22 19:29:43 +00:00
miloyip@gmail.com
8f8e905306
Initial version (0.1)
...
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@2 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-11-18 17:01:23 +00:00