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
d2a7335211
fix #202 #203 #204 map encoder not proplery initialized
2017-12-08 21:18:59 +08:00
Tao Wen
ff2b70c1db
support config level extension
2017-11-23 00:09:35 +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
b1b003864e
expose OptionalEncoder&OptionalDecoder; add attachment to Stream&Iterator for customized decoder/encoder
2017-11-08 11:41:45 +08: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
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
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
d80309af3b
#156 invoke Marshaler defined on pointer types
2017-09-01 15:44:12 +08: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
c15b4d116c
#139 unmarshal non base64 into []byte
2017-07-19 12:04:22 +08:00
Tao Wen
f0487718f6
document public symbols
2017-07-09 16:09:23 +08:00
Tao Wen
bf002a02be
#102 create correct type when pointer to Marshaler/Unmarshaler is nil
2017-07-02 11:35:30 +08:00
Tao Wen
815aa331a8
#101 checkIsEmpty can not reuse createEncoderOfSimpleType, otherwise it will fail when struct member is not serializable
2017-07-02 11:13:21 +08:00
Tao Wen
54ab168362
#99 support uintptr
2017-07-02 11:03:13 +08:00
Tao Wen
f2c50ef73b
#97 omit empty behavior should follow the original type
2017-07-02 00:41:23 +08:00
Tao Wen
84fa033353
#80 fix the case when embedded struct ptr is nil
2017-06-29 18:45:11 +08:00
Tao Wen
545a32f2a1
#76 support TextUnmarshal
2017-06-29 00:14:55 +08:00
Tao Wen
08dbc98040
#76 fix UnmarshalJSON
2017-06-28 23:55:32 +08:00
Tao Wen
76e62088df
#78 not null pointer is considered not empty
2017-06-28 23:39:46 +08:00
Tao Wen
cf77980493
#71 fixed []byte alias
2017-06-26 14:25:56 +08:00
Tao Wen
d100b0d41f
fix typo
2017-06-26 10:02:45 +08:00
Tao Wen
81e64121ba
#71 fix html escape for string alias
2017-06-26 09:57:45 +08:00
Tao Wen
486534c67c
#67 time as int64
2017-06-20 17:43:47 +08:00
Tao Wen
85be06b145
#68 empty array to object/map
2017-06-20 16:36:22 +08:00
Tao Wen
818ae1331a
#68 number to string
2017-06-20 15:11:01 +08:00
Tao Wen
c36a7ed7cd
#66 extract out feacture_reflect_extension
2017-06-20 08:42:25 +08:00
Tao Wen
14588726a1
expose ValEncoder & ValDecoder
2017-06-20 08:08:59 +08:00
Tao Wen
b3170a8cef
rename Encoder => ValEncoder and Decoder => ValDecoder
2017-06-20 07:59:45 +08:00
Tao Wen
43a832beee
add isEmptyFunc
2017-06-20 07:57:23 +08:00
Tao Wen
8367a97ad8
gofmt
2017-06-20 07:39:54 +08:00
Tao Wen
365d399192
#65 make placeholder thread safe
2017-06-20 07:39:38 +08:00
Tao Wen
839247df05
#63 fix Marshaler and Unmarshaler on struct
2017-06-20 07:23:22 +08:00
Tao Wen
c3f5a2c536
#64 support fixed array
2017-06-19 23:43:28 +08:00
Tao Wen
c6a598e292
# add jsoniter.RawMessage
2017-06-19 23:10:20 +08:00
Tao Wen
50583f6bae
#63 support *json.RawMessage
2017-06-19 22:57:43 +08:00
Tao Wen
69bc64b6d8
#54 support sort map keys
2017-06-16 16:46:30 +08:00
Tao Wen
d867c8ba5c
#53 split config into Config and frozenConfig
2017-06-13 18:49:35 +08:00
Tao Wen
acddcf5bbf
#53 extract out config
2017-06-13 16:58:53 +08:00
Tao Wen
788918b85d
#56 nil map or array should be null not [] or {}
2017-06-13 09:14:19 +08:00
Fei Ni
6f50f15678
decoder/encoder;float precision doc
2017-06-11 16:30:31 +08:00
Fei Ni
cee09816e3
decoder/encoder;float precision doc
2017-06-11 16:28:31 +08:00
Tao Wen
cfffa29c8a
gofmt
2017-06-06 23:27:00 +08:00
Tao Wen
a4e5abf492
support []byte; marshal without copy
2017-06-06 09:44:56 +08:00
Tao Wen
3979955e69
support TextMarshaler as map key
2017-06-06 00:09:33 +08:00
Tao Wen
5fd09f0e02
remove mapInterfaceEncoder
2017-06-05 23:56:37 +08:00
Tao Wen
af4982b22c
support decode int key map
2017-06-05 23:53:48 +08:00
Tao Wen
a7f992f0e1
#35 fix json.Number matches string
2017-06-02 15:43:58 +08:00