Milo Yip
e6b192a75c
Merge pull request #869 from StilesCrisis/writer-key-fix
...
Writer EndObject missing-value fix
2017-02-28 16:02:52 +08:00
StilesCrisis
4643104b8a
Fix null handler construction
...
We should not malloc the null-handler object and cast to OutputHandler;
we need to actually invoke the constructor via placement new.
2017-02-27 23:28:25 -08:00
StilesCrisis
fa84cd18f4
Add matching fix for PrettyWriter
...
PrettyWriter EndObject will now also assert if called when a key is
missing its matching value.
2017-02-27 22:53:59 -08:00
StilesCrisis
2e9b7b1ae6
Added assertion
...
Documented existing assertions in EndObject
Added new assertion in EndObject to catch error condition where objects
are ended with a key but no matching value.
2017-02-27 22:44:13 -08:00
Milo Yip
97e2f7f16f
Try fixing Error compilation Ubuntu 14.04 #834
2017-02-28 09:48:36 +08:00
Milo Yip
82295b1f4d
Merge pull request #842 from StilesCrisis/token-by-token-parsing
...
Token-by-token pull parsing
2017-02-26 22:36:04 +08:00
ylavic
b977fd3c9d
Missing "internal" namespace for StrLen
...
include/rapidjson/pointer.h:243:40: error: 'StrLen' was not declared in this scope
return Append(name, StrLen(name), allocator);
2017-02-24 16:46:53 +01:00
StilesCrisis
ecf3d64293
Merge branch 'nan-inf-parse-fix' into token-by-token-parsing
2017-02-23 00:19:07 -08:00
StilesCrisis
5e785d3db2
Fix parsing of NaN/Inf
...
A failed half-consume of “NaN” now returns “value invalid” instead of
attempting to consume an “Inf”.
2017-02-23 00:11:12 -08:00
John Stiles
0f8389e787
Restored original IterativeParse implementation
...
Runs about 1-2% faster (original speed) by running in a tight loop, at
the expense of slight code duplication with IterativeParseNext.
2017-02-07 00:02:08 -08:00
StilesCrisis
4394b3bac7
Add LIKELY and UNLIKELY hints
...
Doesn’t seem to affect timings in perftest on my machine, but it may
help others.
2017-02-04 00:05:34 -08:00
StilesCrisis
116f65994b
Improve coverage and performance
...
Further improvement to perftest and hoping to make coveralls happy.
2017-02-03 18:58:37 -08:00
StilesCrisis
5de7258478
Improve performance
...
Slight performance improvement over previous submission
2017-02-03 17:14:14 -08:00
StilesCrisis
1a7c5ea517
Fix Dev Studio bool-conversion warning
2017-02-03 00:29:43 -08:00
StilesCrisis
20f5caa8f6
Token-by-token pull parsing
...
Refactored the iterative parser so that users can parse a single JSON
element at a time (invoking the handler one time) and then return
control to the calling code. Call IterativeParseInit to start, and then
call IterativeParseNext to retrieve one JSON element. Use
IterativeParseComplete to check for JSON document completion.
2017-02-02 23:25:29 -08:00
Milo Yip
3693e942b7
Fix output character type in writers
2017-01-24 14:54:50 +08:00
Milo Yip
942bb46088
Merge pull request #827 from lichray/fix-signed
...
Treat signed-unsigned conversions as errors.
2017-01-24 14:35:17 +08:00
Milo Yip
265fb6ee88
Fix #831 RAPIDJSON_HAS_CXX11_RANGE_FOR is error defined
2017-01-24 09:28:52 +08:00
Zhihao Yuan
3cc77d5d63
Treat signed-unsigned conversions as errors.
2017-01-18 18:09:18 -06:00
Milo Yip
03a7391049
Merge pull request #757 from patcheng/feature/fix_clang_warning
...
added assertion to help suppress clang warnings
2016-12-23 10:00:30 +08:00
Andrey Glebov
41ceb8624f
- replaced RAPIDJSON_NEW with C++98 compatible version
2016-12-21 14:03:53 +03:00
Andrey Glebov
9fe93bb984
- replaced RAPIDJSON_NEW macro with variadic varient
2016-12-21 10:17:25 +03:00
Milo Yip
e07d0e9438
Move GenericValue deep-clone constructor into the class declaration.
2016-10-31 18:28:53 +08:00
Milo Yip
95b346c3ca
Refactor GenericValue deep-clone constructor
2016-10-31 18:24:17 +08:00
Milo Yip
d7dd4106ea
Remove empty NumberStream::~NumberStream()
...
Fix #781
2016-10-25 18:21:01 +08:00
Milo Yip
d6c8b378d4
Merge pull request #777 from miloyip/issue728_threadsafe
...
Fix nullHandler allocation bug
2016-10-21 17:35:53 +08:00
Milo Yip
992b7f5f8e
Fix nullHandler allocation bug
2016-10-21 12:25:37 +08:00
Milo Yip
fba9ebd9bc
Merge pull request #776 from miloyip/issue728_threadsafe
...
Remove singletons in schema classes
2016-10-20 14:01:32 +08:00
Milo Yip
59bcebbf3d
Merge pull request #773 from bluehero/master
...
use _mm_cmpistri
2016-10-18 14:38:39 +08:00
Milo Yip
bf0cc7bea8
Fixed a bug for SchemaDocument move constructor
2016-10-18 13:53:00 +08:00
bluehero
31ace3b767
use _mm_cmpistri
2016-10-18 12:54:42 +08:00
Milo Yip
7c4e511eb0
Change Schema::GetTypeless() from singleton to instance
...
Now owned by SchemaDocument::typeless_, and be shared to its
Schema::typeless_
2016-10-18 11:37:15 +08:00
Milo Yip
ddbd2ef05d
Restore missing deallocation of GenericSchemaValidator::nullHandler_
2016-10-18 10:14:00 +08:00
Milo Yip
b963eb447b
Change SchemaValidator::GetNullHandler() from singleton to instance.
2016-10-17 18:30:18 +08:00
Milo Yip
97fb9bc85b
Merge pull request #770 from miloyip/issue728_threadsafe
...
Fixed another crash bug in #728
2016-10-17 15:35:01 +08:00
Milo Yip
3b1a037499
Merge pull request #748 from sfinktah/sfinktah-minwindef-fix
...
Fix for winmindef.h defining min/max macros
2016-10-17 14:29:10 +08:00
Milo Yip
517dd4dbb8
Fix failing to resolve $ref in allOf causes crash in SchemaValidator::StartObject()
2016-10-17 14:25:24 +08:00
Milo Yip
2363227974
Add Value::Value(float) and static_cast for suppressing clang warning
2016-10-14 22:03:54 +08:00
Patrick Cheng
95224aff7d
When length is 0, the code does nothing, so skip it completely.
...
Previously, os.Push(0) would do nothing as well. But with the newly added assertion, is the stack is empty, it will fail the assertion.
2016-09-30 13:44:15 -07:00
Patrick Cheng
91a803d463
Reserve() is sometimes called when stackTop_ is null. The assert is invalid.
2016-09-30 11:12:23 -07:00
Patrick Cheng
9d8df28c1d
added assertion to help suppress clang warnings
2016-09-30 10:47:00 -07:00
Adam Majer
cb017cbf5e
Fix compilation with older GCC versions
...
Older GCC versions fail compiling RapidJSON due to a warning
include/rapidjson/reader.h:578: error: suggest a space before ';' or explicit braces around empty body in 'while' statement
: warnings being treated as errors
2016-09-30 17:10:04 +02:00
Sfinktah Bungholio
51a31ce006
Fix for winmindef.h defining min/max macros
2016-09-25 20:36:33 +10:00
Milo Yip
5cd62c235d
Add StringBuffer::GetLength()
...
Fix #744
2016-09-22 18:11:22 +08:00
Milo Yip
f28203c7a1
Fix #741
2016-09-21 11:09:04 +08:00
Tall??di Mih??ly
62dc1077eb
Move constructor support for PrettyWriter
2016-09-19 21:47:27 +02:00
Tall??di Mih??ly
307e021606
Move constructor support for Writer
...
This also requires turning off the c++98 compatibility checks when building
with clang.
2016-09-19 21:47:27 +02:00
Milo Yip
769185d68b
Refactor regex
...
Remove mutable which causes reentrant issue
2016-09-16 12:13:02 +08:00
Milo Yip
3e2172bd52
Add preconditions in writer and string functions
2016-09-03 23:37:00 +08:00
niukuo
250cf666d3
fix wrong length in remote schema
...
Change-Id: Ia96ddf5746f1c18968e9e086f17fe4a24b8480d7
2016-08-31 16:26:27 +08:00