54 Commits

Author SHA1 Message Date
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
23056abad1 Added #include <new> for placement new operator.
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@105 c5894555-1306-4e8d-425f-1f6f381ee07c
2012-11-16 14:33:03 +00:00
miloyip@gmail.com
5136516293 Remove warnings in examples
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@95 c5894555-1306-4e8d-425f-1f6f381ee07c
2012-11-16 13:02:05 +00:00
miloyip@gmail.com
47d60859d0 Additional fixes for Issue 48: incorrect return type of GetUint64()
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@89 c5894555-1306-4e8d-425f-1f6f381ee07c
2012-11-15 07:16:26 +00:00
miloyip@gmail.com
90f983ced2 Fixed Issue 46: old style cast to 'void*' casts away const in document.h
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@88 c5894555-1306-4e8d-425f-1f6f381ee07c
2012-11-15 03:46:14 +00:00
miloyip@gmail.com
d419c0ae5a Test warning fix for Issue 48: incorrect return type of GetUint64()
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@87 c5894555-1306-4e8d-425f-1f6f381ee07c
2012-11-15 03:32:30 +00:00
miloyip@gmail.com
b7d12d8ab5 Fixed Issue 48: incorrect return type of GetUint64()
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@86 c5894555-1306-4e8d-425f-1f6f381ee07c
2012-11-15 03:01:17 +00:00
miloyip@gmail.com
7606d05fed Fixed Issue 45: const Value cannot be stringify
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@84 c5894555-1306-4e8d-425f-1f6f381ee07c
2012-11-14 07:14:46 +00:00
miloyip@gmail.com
9b960b6b0a Fixed Issue 7: GenericValue& operator[](const Ch* name) - bug if key not found
Makes GenericValue::FindMember() public.
Added array element and object member iteration APIs in examples.

git-svn-id: https://rapidjson.googlecode.com/svn/trunk@83 c5894555-1306-4e8d-425f-1f6f381ee07c
2012-11-14 07:07:06 +00:00
miloyip@gmail.com
4ee17e67b1 Fixed Issue 38: Segmentation fault with CrtAllocator
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@80 c5894555-1306-4e8d-425f-1f6f381ee07c
2012-11-14 03:33:10 +00:00
miloyip@gmail.com
94d05da2bc Fixed Issue 28: Parameter ‘inArray’ shadows a member of 'Level' in writer.h
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@78 c5894555-1306-4e8d-425f-1f6f381ee07c
2012-11-14 02:58:16 +00:00
miloyip@gmail.com
790b7f127c Fixed Issue 27 Default allocator is used for GenericReader in GenericDocument::ParseStream
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@77 c5894555-1306-4e8d-425f-1f6f381ee07c
2012-11-14 02:53:04 +00:00
miloyip@gmail.com
9fb77b114b Fixed Issue 22 memory corruption via operator =
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@74 c5894555-1306-4e8d-425f-1f6f381ee07c
2012-11-14 02:44:45 +00:00
miloyip@gmail.com
152c2eff6c Fixed Issue 41 Incorrect parsing of unsigned int number types
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@72 c5894555-1306-4e8d-425f-1f6f381ee07c
2012-11-14 02:36:23 +00:00
miloyip@gmail.com
22ddf37cf0 Fixed issue 30
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@70 c5894555-1306-4e8d-425f-1f6f381ee07c
2012-11-13 09:46:54 +00:00
miloyip@gmail.com
e5562a5757 Fixed a mistake of r67
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@69 c5894555-1306-4e8d-425f-1f6f381ee07c
2012-11-13 09:46:31 +00: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
821c6ab73c Fixed Issue 44 SetStringRaw doesn't work with wchar_t
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@65 c5894555-1306-4e8d-425f-1f6f381ee07c
2012-11-13 02:58:56 +00:00
miloyip@gmail.com
4fdd805c7d Fixed issue 18 from 0.1x branch
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@64 c5894555-1306-4e8d-425f-1f6f381ee07c
2012-03-06 05:36:42 +00:00
miloyip@gmail.com
3d77ef8ee9 Added GenericStringBuffer::GetSize() within unit test, as in 0.1x branch.
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@61 c5894555-1306-4e8d-425f-1f6f381ee07c
2012-02-28 06:21:03 +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
c008d5176b Fixed several issues (10, 11, 13, 14) from 0.1x branch
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@57 c5894555-1306-4e8d-425f-1f6f381ee07c
2012-02-19 15:42:58 +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
bf8fcd19c1 Added prettyauto example, which can handle UTF-8/UTF-16LE/UTF-16BE/UTF-32LE/UTF-32BE
Fixed a bug for using Reader with AutoUTFInputStream 

git-svn-id: https://rapidjson.googlecode.com/svn/trunk@50 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-12-03 11:14:39 +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
f516a01769 Fixed an unit test issue due to without renaming the EncodedStreamTest class.
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@48 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-12-03 06:36:31 +00:00
miloyip@gmail.com
55587d6f62 Added transcoding support in Writer and PrettyWriter
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@47 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-12-03 04:17:07 +00:00
miloyip@gmail.com
8bdcd74227 Fixed one decoding/validating bug in UTF8
Fixed one decoding/validating buf in UTF16
Fixed incorrect return type in StringBuffer::GetString()
Added unit tests for encoding/decoding/validating of different encodings

git-svn-id: https://rapidjson.googlecode.com/svn/trunk@46 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-12-03 04:15:56 +00:00
miloyip@gmail.com
c51c90b2a6 Added RFC4627's encoding detection method, with refactored BOM detection.
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@45 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-12-01 16:19:57 +00:00
miloyip@gmail.com
8c15b1d580 Fixed gcc compilation errors.
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@43 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-11-30 17:03:30 +00:00
miloyip@gmail.com
3b1a995d21 Added EncodedOutputStream and AutoUTFOutputStream with unit tests
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@42 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-11-30 16:58:59 +00:00
miloyip@gmail.com
77255c6a7f Commit missing files
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@41 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-11-30 14:17:09 +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
32e001c684 Added Hoehrmann's UTF-8 decoder in perftest for reference
Minor optimization on UTF-8 validation

git-svn-id: https://rapidjson.googlecode.com/svn/trunk@37 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-11-24 08:00:22 +00:00
miloyip@gmail.com
66754fc5b0 Added referenced performance of UTF-8 validation
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@36 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-11-24 07:50:59 +00:00
miloyip@gmail.com
a45bcbba7b Rewrite UTF8::Validate() to obtain better performance.
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@35 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-11-23 17:59:30 +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
77ce51209f Added test cases for UTF8 validation. Fixed a bug in validation.
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@33 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-11-23 16:13:32 +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
b9d932ac9a The missing file for ultrajson performance test.
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@31 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-11-23 02:21:21 +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
78492f9962 Fixed compilation errors in Ubuntu 64-bit
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@29 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-11-22 15:47:11 +00:00
miloyip@gmail.com
9ae680d35b Added ultrajson to perftest, only tested parsing to dummy handler.
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@28 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-11-22 06:12:01 +00:00
miloyip@gmail.com
08d25ad177 Added Flush() to concept stream. Add this new member function to all streams.
Writer and PrettyWriter automatically calls Flush() at the end of JSON text.

git-svn-id: https://rapidjson.googlecode.com/svn/trunk@27 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-11-22 05:10:46 +00:00
miloyip@gmail.com
99de5312e6 Separated platform related performance tests from rapidjsontest
Added multiple platform specific file I/O performance tests
Added CheckSum() in platform test as baseline of parsing speed, which should be more appropriate than strlen().

git-svn-id: https://rapidjson.googlecode.com/svn/trunk@26 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-11-22 05:07:29 +00:00
miloyip@gmail.com
d26a6e8b4d Added missing Flush() in examples. Flush() will be called in Writer later.
git-svn-id: https://rapidjson.googlecode.com/svn/trunk@25 c5894555-1306-4e8d-425f-1f6f381ee07c
2011-11-21 18:54:22 +00:00