978 Commits

Author SHA1 Message Date
Oliver Hahm
885b5cd2f9 common notation of empty if/else case 2017-04-21 14:49:30 +02:00
Oliver Hahm
63423eb6f8 fix return values 2017-04-21 14:49:12 +02:00
Alejandro Martinez
2291258bb8 Added ARM-Neon support for SIMD.SkipWhitespace*
Change-Id: Iaf210d029758723a7eeb7f28fc10cab7467889a9
Signed-off-by: Jun He <jun.he@arm.com>
2017-04-21 07:33:17 +00:00
Milo Yip
e6d7247ed9 Merge pull request #924 from lichray/fix-gcc7-warning
Fix a non-type template parameter type mismatch
2017-04-17 14:44:08 +08:00
Philipp A. Hartmann
f93a29bec2 RAPIDJSON_STATIC_ASSERT: use C++11 static_assert, if available 2017-04-14 20:19:16 +02:00
Zhihao Yuan
ec90588c72
Fix a non-type template parameter type mismatch
This issues a warning in gcc7.
2017-04-08 22:51:15 -05:00
Milo Yip
77f643dc51 Fix #910 incorrect casting 2017-04-07 10:23:30 +08:00
Milo Yip
5d9d0f78b5 Merge pull request #909 from miloyip/issue905_PrettyWriterWriteFlags
Fix #905 unable to set writeFlags for PrettyWriter
2017-03-27 18:26:17 +08:00
Milo Yip
d88be8ef16 Fix #905 unable to set writeFlags for PrettyWriter 2017-03-27 14:05:03 +08:00
Alejandro Martinez
85500e8c8f Changed error code for invalid special ascii chars, fixed writer tests 2017-03-24 13:37:23 +00:00
Alejandro Martinez
da4fd6794c Fixed bug on space hexadecimal encoding 2017-03-22 10:19:54 +00:00
Milo Yip
e5635fb27f Fix #899 2017-03-16 10:46:48 +08:00
Milo Yip
bba388b4fa Merge pull request #896 from StilesCrisis/writer-flush-api
Writer flush api
2017-03-16 10:36:25 +08:00
Milo Yip
465fab45c1 Merge pull request #897 from StilesCrisis/issue-889-pretty-writer
Issue 889 pretty writer
2017-03-16 10:35:26 +08:00
John Stiles
d5d18cf694 Fix template length optimization issue in PrettyWriter
Missed PrettyWriter in the initial fix for Issue #889
2017-03-14 23:48:41 -07:00
John Stiles
31c6c50ac6 Provide a Flush() API within Writer
This is helpful if you’re writing code that needs to control flush
behavior and you don’t want to pass around your buffer object to each
handler function alongside the writer. Seems like an easy convenience
to add.
2017-03-14 23:28:59 -07:00
John Stiles
55f8a32020 Remove broken templatized string length optimization
It did not support char arrays.
2017-03-12 23:47:59 -07:00
John Stiles
c4e3d6243c Fix msvc x64 compilation issue
Disambiguate by putting the ENABLEIF on the return value instead of in
the argument list.
2017-03-05 09:50:03 -08:00
John Stiles
cdea825a0b Assert that String() and Key() are given null-terminated strings
Assert in case users attempt to pass a char array to String() or Key()
that is not null terminated; that is not the intended use of the API.
Null terminate your string buffers.
2017-03-05 09:23:03 -08:00
John Stiles
61f8c4ef0d Quoted strings to String() or Key() are auto-sized by template
Same fix as previous commit, to prettywriter
2017-03-05 00:38:34 -08:00
John Stiles
dd97ede84d Quoted strings to String() or Key() are auto-sized by template
No strlen call needs to be made when templates can auto-deduce the
string length. No strlen = faster!

Unfortunately this needs a touch of  SFINAE to allow multiple overrides
to coexist cleanly.
2017-03-05 00:27:08 -08:00
John Stiles
db8d3bb4d6 Remove unneeded change 2017-03-03 00:42:00 -08:00
John Stiles
3f9ebfe9e9 Trivial change to trigger Travis CI 2017-03-02 21:24:03 -08:00
StilesCrisis
6e2e5c7dbe Specialize StrLen for char/wchar_t
Compilers generally provide a much smarter strlen than ours.
2017-02-28 01:11:30 -08:00
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