1
0
mirror of https://github.com/json-iterator/go.git synced 2024-11-27 08:30:57 +02:00
Commit Graph

637 Commits

Author SHA1 Message Date
Tao Wen
477be43d00 consolidate more tests 2018-02-14 10:13:34 +08:00
Tao Wen
a8708bca85 consolidate more tests 2018-02-14 08:58:59 +08:00
Tao Wen
658ff9ef15 consolidate more tests 2018-02-14 08:48:12 +08:00
Tao Wen
64c1c67885 consolidate more tests 2018-02-14 08:39:18 +08:00
Tao Wen
e3bc511e5a consolidate more tests 2018-02-14 08:28:17 +08:00
Tao Wen
8fa357ab7b consolidate mor tests 2018-02-13 23:49:40 +08:00
Tao Wen
761ce8cce2 consolidate more tests 2018-02-13 20:58:29 +08:00
Tao Wen
c3b6c1e845 consolidate skip tests 2018-02-13 20:41:21 +08:00
Tao Wen
0ed9de94f2 support asymmetric tests 2018-02-13 20:25:27 +08:00
Tao Wen
6fded6eb5f consolidate struct tags tests 2018-02-13 17:22:47 +08:00
Tao Wen
dc3395f770 consolidate struct tests 2018-02-13 17:06:28 +08:00
Tao Wen
bd4e013f98 consolidate slice tests 2018-02-13 16:20:08 +08:00
Tao Wen
48a4a1e4db consolidate map tests 2018-02-13 16:07:14 +08:00
Tao Wen
9bc223734a consolidate marshaler tests 2018-02-13 16:00:08 +08:00
Tao Wen
eb9aeccee2 consolidate builtin tests 2018-02-13 15:48:39 +08:00
Tao Wen
28adca2a14 consolidate array test 2018-02-13 15:43:10 +08:00
Tao Wen
a9b3f36b2f add test framework 2018-02-13 15:32:21 +08:00
Tao Wen
002b5ae342 fix tests 2018-02-05 23:45:42 +08:00
Tao Wen
07f99a1124 fix build 2018-02-05 23:05:57 +08:00
Tao Wen
71f74dc71e implement #230 DisallowUnknownFields option added 2018-02-05 23:03:53 +08:00
Tao Wen
7990317be5 gofmt 2018-02-05 22:45:04 +08:00
Tao Wen
9edd73f752 fix build 2018-02-05 22:26:39 +08:00
Tao Wen
3d5ee1098a Merge branch 'master' of https://github.com/json-iterator/go 2018-02-05 21:43:52 +08:00
Tao Wen
ee8cfb7547 cache frozenConfig 2018-02-05 21:43:37 +08:00
Tao Wen
bca911dae0
Update README.md 2018-01-28 22:27:09 +08:00
Tao Wen
28452fcdec cow cache is not same, as map read will modify the underlying map. use sync.Map for 1.9 and above, and mutex if sync.Map not available 2018-01-28 17:00:11 +08:00
Tao Wen
ea8c33040f fix #228 2018-01-27 16:25:48 +08:00
Tao Wen
358cfc3929 Merge branch 'master' of https://github.com/json-iterator/go 2018-01-25 14:48:02 +08:00
Tao Wen
c39a632e65 fix #227, fix empty json.Number 2018-01-25 14:47:50 +08:00
Tao Wen
e31252f2e2
Merge pull request #225 from mgood/empty-array-fix
Fix encoding 0-length arrays
2018-01-23 23:31:07 +08:00
Matt Good
807e4a8b20 Optimize 0-length array case
Instead of checking the array length in encode, this can be checked up
front in `encoderOfArray` since the array type has a fixed length
determined at compile time. So return an `emptyArrayEncoder` that simply
writes an empty array to the stream.
2018-01-22 14:03:50 -08:00
Tao Wen
e78b7e89b6 Merge branch 'master' of https://github.com/json-iterator/go 2018-01-21 20:59:32 +08:00
Tao Wen
945d1aaa19 fix #140 uintptr will no lock the address from gc 2018-01-21 20:59:18 +08:00
Matt Good
ba3857729b Fix encoding 0-length arrays
The array encoder assumed that arrays had at least one value, so it
would serialize them with a zero-value for the array, such as `[0]`.

This adds a test to reproduce the issue, and updates the encoder to
write an empty array if the length is 0.
2018-01-16 11:02:03 -08:00
Tao Wen
c3ed5e85e0
Merge pull request #222 from neverlee/mydev
加入一个OnlyTaggedField选项
2018-01-09 18:30:25 +08:00
李盼
c27f6f9350 config: add OnlyTaggedField config, only process tagged fields in struct 2018-01-09 17:29:47 +08:00
Tao Wen
0ab880662f fix #219 should check real value for empty instead of just the pointer for nested field 2018-01-07 13:57:46 +08:00
Tao Wen
6dad2de6cc fix build 2018-01-04 17:18:16 +08:00
Tao Wen
11c1cce0d8 fix #217 when input is null, non-decodable type should not be considered as error, to be compatible with stdlib 2018-01-04 16:19:26 +08:00
Tao Wen
96fcb84835 fix #215 lazy load more 2017-12-23 10:52:17 +08:00
Tao Wen
e7a8aea845 Merge branch 'master' of https://github.com/json-iterator/go 2017-12-21 22:18:40 +08:00
Tao Wen
60a9df5ebc fix #214 report EOF like stdlib 2017-12-21 22:18:28 +08:00
Tao Wen
7b060ec866
Merge pull request #210 from coocood/master
add ReadNumber for Iterator.
2017-12-18 08:22:47 +09:00
Ewan Chou
25f147f530 add ReadNumber for Iterator. 2017-12-17 16:44:04 +08:00
Tao Wen
a9b9c73b4d fix #207 delay unsupported type error reporting 2017-12-15 10:13:11 +08:00
Tao Wen
e0df39fda2 fix #206, do not allow nil pointer as unmarshal input 2017-12-14 17:18:05 +08:00
Tao Wen
13f86432b8 do not use defer() in read int 2017-12-12 18:52:41 +08:00
Tao Wen
d2a7335211 fix #202 #203 #204 map encoder not proplery initialized 2017-12-08 21:18:59 +08:00
Tao Wen
b2a706d14b reverse last commit, need a better fix 2017-12-08 06:15:49 +08:00
Tao Wen
23078876c5 fix #203 consider MarshalJSON as non empty 2017-12-07 23:20:43 +08:00