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
Tao Wen
051434fab7
fix #198 , use dep for vendoring
2017-11-30 10:42:24 +08:00
Tao Wen
be6688fc1a
fix #200 , do not use symbolic link in the code
2017-11-30 10:34:05 +08:00
Tao Wen
ff2b70c1db
support config level extension
2017-11-23 00:09:35 +08:00
Tao Wen
f7279a603e
fix out of range
2017-11-15 23:34:21 +08:00
Tao Wen
9f088cbcc4
fix #195 when decode float as int, report it clearly
2017-11-15 23:25:12 +08:00
Tao Wen
3c0e5762c4
fix #196 do not hard code 1 << 49
2017-11-15 23:15:31 +08:00
Tao Wen
d394a135a1
#197 fix place holder encoder to use EncodeInterface, WriteToStream is unsafe when the real encoder is unknown
2017-11-15 22:56:23 +08:00
Tao Wen
9fddff05f0
try to fix #194 with larger array
2017-11-11 08:31:44 +08:00
Tao Wen
b1b003864e
expose OptionalEncoder&OptionalDecoder; add attachment to Stream&Iterator for customized decoder/encoder
2017-11-08 11:41:45 +08:00
Tao Wen
aed5a81f09
fix #190 handle empty input
2017-10-31 22:47:02 +08:00
Tao Wen
f1258b01aa
fix #191 do not always assume the object field is simple string
2017-10-31 22:38:41 +08:00
Tao Wen
fbd210edfc
Merge pull request #189 from ggaaooppeenngg/compatible-with-map
...
Fix standard compatiblility
2017-10-26 18:39:38 -05:00
Peng Gao
640251ab91
Fix standard compatiblility
...
Non-nil but empty map with omitempty should be ignored.
Signed-off-by: Peng Gao <peng.gao.dut@gmail.com>
2017-10-27 01:43:41 +08:00
Tao Wen
06b2a7cf1d
Merge pull request #188 from ggaaooppeenngg/compatible
...
Fix standard compatiblility
2017-10-26 06:41:01 -05:00
Peng Gao
5fffb9b8f7
Fix standard compatiblility
...
Encode has trailing newline at the end.
Signed-off-by: Peng Gao <peng.gao.dut@gmail.com>
2017-10-26 15:15:36 +08:00
Tao Wen
7e3b776024
change jsoniter-sloppy to jsoniter_sloppy
2017-10-23 15:03:44 +08:00
Tao Wen
6240e1e798
#185 add jsoniter.Valid
2017-10-10 08:57:02 +08:00
Tao Wen
0149a5cf4a
fix #183 error message not only show expectation, but also the actual value
2017-10-09 08:24:51 +08:00
Tao Wen
5068c8baaf
#183 limit error message size
2017-10-09 08:16:52 +08:00
Tao Wen
16f78601b5
fix #184 , support null as number
2017-10-07 09:29:32 +08:00
Tao Wen
8f50a91be2
fix #181 , support string as json.Number and jsoniter.Number
2017-10-06 18:08:14 +08:00
Tao Wen
73c7bc881e
fix #180 , add missing methods to jsoniter.Number
2017-10-06 17:56:36 +08:00
Tao Wen
4de15a3a87
Merge pull request #182 from MOZGIII/patch-1
...
Used writeTwoBytes in Stream.WriteEmptyArray
2017-10-04 02:25:32 -05:00
MOZGIII
14b28b2226
Used writeTwoBytes in Stream.WriteEmptyArray
2017-10-03 22:14:36 +03:00