Jason Toffaletti
ddc5af4512
fix encoding of nil non-empty interface
2017-09-16 16:04:36 -07:00
Jason Toffaletti
2f7e5c8dd7
add failing tests for nil non-empty interfaces
2017-09-16 16:00:48 -07:00
Tao Wen
92772579dd
Merge pull request #170 from olegshaldybin/marshal-enum-pointer
...
Fix custom marshaler for enum types
1.0.1
2017-09-15 09:08:45 -05:00
Oleg Shaldybin
ae57d167e8
Fix custom marshaler for enum types
...
When MarshalJSON was defined on a pointer receiver custom enum type
marshaling/unmarshaling was panicing since the underlying primitive type
was treated as a pointer.
Since method set for pointer receivers includes value receiver methods
we don't really need optionalEncoder and can just use marshalEncoder
directly.
2017-09-14 23:26:12 -07:00
Tao Wen
eef35e549b
Merge pull request #169 from toffaletti/fix-nil-interface
...
Fix handling of nil empty interface
2017-09-15 00:45:11 -05:00
Jason Toffaletti
005d86dc44
fix handling of nil empty interface
2017-09-14 21:32:42 -07:00
Jason Toffaletti
e658f6597a
add failing test for handling of nil interface with omitempty
2017-09-14 20:44:42 -07:00
Tao Wen
f8eb43eda3
Merge pull request #168 from olegshaldybin/null-booleans
...
Allow null booleans
2017-09-14 20:58:31 -05:00
Oleg Shaldybin
18a241d40b
Allow null booleans
...
Make sure we do the same thing as stdlib with null booleans by not
touching the original value and discarding the null.
Another somewhat related change is nulling out null interface values in
the original structure. This also matches stdlib behavior.
2017-09-14 16:47:35 -07:00
Tao Wen
0fdf883ac0
Merge pull request #167 from olegshaldybin/shorter-sleep
...
Shorter sleep while waiting for encoder/decoder
2017-09-14 18:23:29 -05:00
Oleg Shaldybin
34fbec74ad
Shorter sleep while waiting for encoder/decoder
...
If the client is using the same jsoniter config with multiple goroutines
it's very likely that few initial operations will encounter a placeholder
encoder/decoder while the real one is being created by another
goroutine. Having a full second sleep seems too conservative, since
encoder/decoder will be created in a very short time. This is very easy
to reproduce in any real environment with a few concurrent requests of
the same type. A few initial requests will have 1s+ response time.
Changing to 10ms should smooth out marshal/unmarshal times for these
initial concurrent requests.
2017-09-14 12:37:47 -07:00
Tao Wen
90574c5ca3
#166 support ValidateJsonRawMessage in ConfigCompatibleWithStandardLibrary
2017-09-14 23:54:40 +08:00
Tao Wen
6a4ba7bfa9
Merge branch 'master' of https://github.com/json-iterator/go
2017-09-09 08:46:07 +08:00
Tao Wen
0828e559d0
#164 support interface{} with ptr
2017-09-09 08:45:57 +08:00
Tao Wen
2c67d0f68a
Merge pull request #163 from dvrkps/patch-2
...
travis: add 1.x to go versions
2017-09-07 11:25:07 -05:00
Davor Kapsa
f29a0391bc
travis: add 1.x to go versions
2017-09-07 17:12:42 +02:00
Tao Wen
374e68a144
Merge pull request #162 from cch123/fix-bool-to-number
...
fix fuzzy decoder from bool value to number
2017-09-06 00:19:18 -05:00
Xargin
b134d86290
optimize code
2017-09-06 13:18:05 +08:00
Xargin
bc3221879d
fix fuzzy decoder from bool value to number
2017-09-06 12:31:56 +08:00
Tao Wen
8c7fc7584a
#159 fix fuzzy decoder, the newIter assigned io.EOF error to original iterator, which stopped further processing
2017-09-06 00:31:25 +08:00
Tao Wen
db32ee8c2d
#157 number can be null
2017-09-05 13:00:03 +08:00
Tao Wen
d80309af3b
#156 invoke Marshaler defined on pointer types
2017-09-01 15:44:12 +08:00
Tao Wen
36b14963da
#153 fix invalid utf8 using same implementation as the standard library
1.0.0
2017-08-29 23:58:51 +08:00
Tao Wen
f706335302
#153 fix critical bug: infinite loop when write string is invalid utf8
2017-08-29 23:39:43 +08:00
Tao Wen
2dc0031b26
#152 gofmt
2017-08-25 12:53:23 +08:00
Tao Wen
cdbd2ed810
#145 interface {} customizatoin is recursive
2017-08-22 10:39:01 +08:00
Tao Wen
39e9d67807
Merge branch 'master' of https://github.com/json-iterator/go
2017-08-22 00:12:18 +08:00
Tao Wen
2066b01acb
#146 support config TagKey
2017-08-22 00:12:09 +08:00
Tao Wen
ac3b3cd160
test []interface{}
2017-08-21 22:43:51 +08:00
Tao Wen
887789156a
Merge pull request #147 from thockin/output_tests
...
Add tests for int64
2017-08-11 12:55:48 +08:00
Tim Hockin
7df5a67d0d
Add tests for int64
2017-08-10 20:58:49 -07:00
Tao Wen
9c358632dc
#144 make []byte support Unmarshaler&Marshaler
2017-08-09 13:59:40 +08:00
Tao Wen
1cfa233923
#143 make jsoniter.Number same meaning as json.Number, however UseNumber still returns json.Number. 1.9 alias support should be added later
2017-08-05 07:22:53 +08:00
Tao Wen
d249b05a85
rename ValueType, to avoid collision with json.Number
2017-08-05 07:10:15 +08:00
Tao Wen
abbd16da6c
#140 blind fix
2017-08-02 09:20:43 +08:00
Tao Wen
b67201557a
avoid gc issue
2017-08-01 08:34:38 +08:00
Tao Wen
5124683f24
#140 try fix: maybe memory collected before assigned to existing object graph
2017-07-31 23:24:58 +08:00
Tao Wen
4892de725b
add ad
2017-07-31 21:49:02 +08:00
Tao Wen
34a2174be3
#142 decode struct field should be case insensitiveyet another fix
2017-07-31 21:48:22 +08:00
Tao Wen
24ecaff2a1
#142 decode struct field should be case insensitive, the bug only happen for struct with more than 10 fields
2017-07-31 20:50:07 +08:00
Tao Wen
c15b4d116c
#139 unmarshal non base64 into []byte
2017-07-19 12:04:22 +08:00
Tao Wen
12cd299fa8
add benchmark for Skip()
2017-07-19 00:22:41 +08:00
Tao Wen
60ba332980
acknowledge @mattn for #138 #137 #136 #135
2017-07-19 00:09:50 +08:00
Tao Wen
f705934fbf
#138 fix - without following digits; fix 1.e1
2017-07-18 23:48:40 +08:00
Tao Wen
17a26a6e20
remove debug print
2017-07-18 23:24:21 +08:00
Tao Wen
156284b028
#137 fix unicode surrogate incompatibility
2017-07-18 23:17:52 +08:00
Tao Wen
6b6938829d
#136 strconv.ParseFloat can not validate 1. , added extra validation for this special case
2017-07-18 22:19:52 +08:00
Tao Wen
e066e54964
#135 verify 1e1 and 1.0e1 is handled same as std
jsoniter-go-0.9.19
2017-07-18 11:28:19 +08:00
Tao Wen
18d6ae2668
#135 fix leading zero
2017-07-18 11:23:29 +08:00
Tao Wen
c966eaa031
#135 fix double negative
2017-07-18 11:05:39 +08:00