Milo Yip
1fafc38ee2
Merge pull request #122 from miloyip/issue114tmpnam
...
Replace tmpname() by mkstemp() on non-MSVC compilers
2014-08-29 00:01:12 +09:00
Milo Yip
e27f7e7123
Merge pull request #119 from miloyip/issue116extramemberapi
...
Three new APIs are added for JSON object type.
2014-08-28 23:41:32 +09:00
miloyip
6f4c83ad30
Replace tmpname() by mkstemp() on non-MSVC compilers
2014-08-28 22:19:56 +08:00
Milo Yip
991aeaa01c
Merge pull request #115 from wrr/warningfix
...
Fix `RAPIDJSON_HAS_STDSTRING is not defined` compilation warning
2014-08-28 23:16:59 +09:00
Milo Yip
284dcf3dc5
Change MemberEmpty() to ObjectEmpty()
2014-08-28 20:25:41 +08:00
Milo Yip
8dfc97f5d6
Change PrettyWriter Allocator=MemoryPoolAllocator<> to StackAllocator = CrtAllocator
...
Fixes #118
2014-08-28 20:03:03 +08:00
Milo Yip
dc834c9c03
Add Value::MemberCount(), MemberEmpty(), RemoveAllMembers()
2014-08-27 23:14:17 +08:00
Milo Yip
b5928618d4
Merge pull request #112 from pah/fixes/111
...
Use local typedef to invoke GenericMember's destructor
2014-08-27 23:04:06 +09:00
Philipp A. Hartmann
a9add7bd2a
GenericValue: add non-template overload for operator!=
...
As reported in #113 , recent versions of Clang complain about
ambiguous overloads for some comparison operator instantiations,
especially if the deduced template type is a GenericValue.
Add an explicit, non-templated version for now (which is a better
match).
This only solves part of the problem, as comparisons between
* GenericValue & GenericDocument
* GenericValue with different SourceAllocator types
will still cause ambiguities.
2014-08-26 20:06:25 +02:00
Jan Wrobel
fa5b1efd23
Fix RAPIDJSON_HAS_STDSTRING is not defined
compilation warning
2014-08-26 19:23:58 +02:00
Philipp A. Hartmann
db7a51041e
Use local typedef to invoke GenericMember's destructor ( fixes #111 )
2014-08-26 15:36:20 +02:00
miloyip
38889835ce
Add google test as submodule
2014-08-23 12:00:10 +08:00
miloyip
86802f8bf1
Remove gtest
2014-08-23 12:00:10 +08:00
Milo Yip
831d03d132
Merge pull request #110 from pah/fixes/memberiterator-comparisons
...
GenericMemberIterator: fix comparisons/differences for mixed-constness expressions
2014-08-21 17:01:43 +08:00
Philipp A. Hartmann
889f3fa9c0
valuetest: add tests for member iterator conversions/relations
2014-08-21 10:47:00 +02:00
Philipp A. Hartmann
26c24d0bd9
GenericMemberIterator: allow mixed-constness comparisons and differences
2014-08-21 10:45:23 +02:00
Philipp A. Hartmann
618fe2f4fc
GenericValue::MemberErase: drop explicit iterator conversions
2014-08-21 10:40:13 +02:00
Milo Yip
ca5000ba67
Merge pull request #108 from miloyip/ParsingOptimization
...
Parsing optimization
2014-08-21 12:53:17 +08:00
miloyip
4f81c873a6
Optimize SkipWhitespace_SIMD()
...
Do unaligned non-SIMD matching first, and then SIMD matching later.
Also add a fast path for no skipping.
2014-08-20 17:49:30 +08:00
Milo Yip
df70ee8219
Merge pull request #107 from pah/feature/basic_string
...
GenericValue: add optional support for std::string
2014-08-20 15:19:19 +08:00
miloyip
fdc2b569db
Optimize number parsing for 64-bit architecture
2014-08-20 15:17:21 +08:00
Philipp A. Hartmann
ae3e12d7df
.travis.yml: include RAPIDJSON_HAS_STDSTRING tests
2014-08-20 07:08:01 +02:00
Philipp A. Hartmann
2e0b8730a1
add tests for RAPIDJSON_HAS_STDSTRING
2014-08-20 07:07:55 +02:00
Philipp A. Hartmann
744b4852ff
GenericValue: add (optional) support for std::string
...
Some users may want to use RapidJSON with std::string objects. This commits
adds an (opt-in) feature to include some basic support. The implementation
uses std::basic_string<Ch> as generic string type.
Support currently covers:
* construction
* comparison
No special APIs for AddMember or PushBack have been added, as std::string
most probably requires copying (or an explicit StringRef() call).
2014-08-20 07:07:55 +02:00
Philipp A. Hartmann
702b45bb6e
GenericValue: refactoring of operator==/!=
...
By restructuring the call forwarding of the various operator== and
operator!= overloads, new overloads can be added by simply adding an
additional member operator==.
Additionally, the "Ch*" overloads are dropped in favour of an SFINAE
version that removes the pointer variants from matching the templated
operator== (see also operator=).
2014-08-20 07:07:42 +02:00
Milo Yip
1adeecb12e
Merge pull request #106 from pah/doc/config-error
...
Add Doxygen documentation for configuration macros and error handling
2014-08-20 09:19:09 +08:00
Philipp A. Hartmann
1621ba3a41
add Doxygen documentation for error handling customization
2014-08-19 19:13:01 +02:00
Philipp A. Hartmann
abcd6df2c0
add Doxygen documentation for configuration macros
2014-08-19 19:12:45 +02:00
Milo Yip
c0a7922db0
Merge pull request #105 from miloyip/MemoryOptimization
...
Memory optimization
2014-08-19 00:07:49 +08:00
Milo Yip
e3aa8f427c
Remove unused macro
2014-08-17 20:55:49 +08:00
Milo Yip
d6513e251c
Fix a gcc compilation error
2014-08-17 18:55:36 +08:00
Milo Yip
941aa93f45
Separate Document's value and stack allocator.
...
Use CrtAllocator for stack.
ShrinkToFit stack after parsing.
2014-08-17 18:33:47 +08:00
Milo Yip
3714019819
Add ShrinkToFit() to StringBuffer and MemoryBuffer
2014-08-17 18:32:08 +08:00
Milo Yip
2e23787753
Change Reader/Writer's stack allocator to CrtAllocator
2014-08-17 18:31:41 +08:00
Milo Yip
4a2ddf8075
Add Stack::ShrinkToFit() and some refactoring.
...
Lazy allocation. (so Document not for parsing don't need to allocate
stack).
Remove redundant stackCapacity member variable.
2014-08-17 18:29:37 +08:00
Milo Yip
4600680a56
Merge pull request #103 from pah/travis/32bit
...
.travis.yml: enable 32-bit builds
2014-08-13 14:33:21 +08:00
miloyip
126e62ed25
Fix #104 ParseNumberHandler fails on 32-bit
...
Use a tighter bound.
2014-08-13 14:16:29 +08:00
Philipp A. Hartmann
e6139299f3
.travis.yml: add g++-multilib/libc6-dbg:i386 only on BITS=32
2014-08-12 15:57:47 +02:00
Philipp A. Hartmann
fa3996ea1d
.travis.yml: install libc6-dbg:i386 to run valgrind on 32-bit
2014-08-12 15:54:07 +02:00
Philipp A. Hartmann
4ed173fc89
.travis.yml: enable 32-bit builds
...
As Ubuntu supports running 32-bit executables based on its multiarch
setup, we can enable the tests on 32-bit configurations as well.
Currently, valgrind fails for 32-bit executables on the 64-bit host.
This requires some more investigation.
2014-08-12 10:53:12 +02:00
Milo Yip
143bb83e74
Merge pull request #101 from pah/feature/rfc7159
...
Move to RFC7159 (closes #90 )
2014-08-12 00:10:53 +08:00
Milo Yip
12da5ecb4b
Merge pull request #100 from pah/fix/clang-32bit
...
Fix sign-comparison warning/error on 32-bit platforms
2014-08-11 23:50:21 +08:00
Philipp A. Hartmann
6863033652
readertest.cpp: remove remaining use of private functions
2014-08-11 17:27:38 +02:00
Philipp A. Hartmann
453eda5f94
tabs to 4 spaces (following 0dbcc1cf)
2014-08-11 17:22:11 +02:00
Philipp A. Hartmann
d84c051564
jsoncheckertest: add checks for iterative parser as well
2014-08-11 17:15:07 +02:00
Philipp A. Hartmann
834109557d
readertest.cpp: use CRTP to activate "ADD_FAILURE()" calls in handlers
2014-08-11 17:15:07 +02:00
Philipp A. Hartmann
3755470f0f
BaseReaderHandler: allow overriding of Default() implementation
...
By adding an optional CRTP template parameter, the BaseReaderHandler
can call the "overridden" `Default()` function from the `Derived`
class.
See https://en.wikipedia.org/wiki/Curiously_recurring_template_pattern
2014-08-11 17:15:07 +02:00
Philipp A. Hartmann
e29a4521b1
readertest.cpp: use top-level Parse functions, instead of internal ones
...
With the allowance of arbitrary root value types, the individual tests
can use the top-level Parse functions, instead of ParseFoo() variants.
Secondly, some unneeded array wrappers have been dropped and non-singular
tests starting with other values than objects or arrays have been added.
2014-08-11 17:14:31 +02:00
Philipp A. Hartmann
24b7976145
tutorial.md: lift restriction to object/array root values
2014-08-11 17:14:31 +02:00
Philipp A. Hartmann
4d031d054a
readme.md: reference RFC7159 instead of RFC4627
2014-08-11 17:14:31 +02:00