Nikolay Dubina
9461257643
fixed null in number json tag string ( #480 )
2020-08-03 10:12:41 +08:00
Sai To Yeung
8961be9c21
Map keys of custom types should serialize using MarshalText when available ( #461 )
...
* Map keys of custom types should serialize/deserialize using MarshalText/UnmarshalText when available
- this brings marshaling/unmarshaling behavior in line with encoding/json
- in general, any types that implement the interfaces from the encoding package (TextUnmarshaler, TextMarshaler, etc.) should use the provided method when available
2020-05-08 10:21:59 +08:00
AllenX2018
53b9d06ba7
temporarily comment out some test case to fix the CI fail since go1.14 released
2020-03-30 16:42:45 +08:00
AllenX2018
58aeb59006
fix issue #449
2020-03-26 14:46:47 +08:00
allen
3987001e27
fix issue #389 #411
2020-01-14 14:14:02 +08:00
Jens Erat
a1c9557592
pass nested error in compatible configuration
...
When invalid types inside a map were marshalled (in general, as soon as
sorted maps have been configured), the error message has not been
propagated out of the map's `subStream`.
Also fix and re-enable the channel test, which now resembles the
behavior of `encoding/json` and tests both default and compatible
configurations.
Signed-off-by: Jens Erat <email@jenserat.de>
2019-11-22 16:56:59 +01:00
Tao Wen
d05f387f50
fix #317 , try parse as BigFloat if overflow
2018-11-12 14:45:56 +08:00
Tao Wen
05d041de10
fix #313 support json marshaller type as map key
2018-10-24 23:28:41 +08:00
Tao Wen
5916df66b3
fix #311 handle nil any
2018-10-24 21:05:37 +08:00
Tao Wen
5d789e5e02
fix #291 omit empty was not handled properly for json raw message
2018-08-06 13:58:33 +08:00
Tao Wen
720ab8dc7f
add tests for #283
2018-07-01 13:05:25 +08:00
Tao Wen
37cc313d18
fix #274 , unescape before base64 decode
2018-05-26 09:38:52 +08:00
Tao Wen
51dd70305b
add more test for #252
2018-04-18 16:22:47 +08:00
Bryan Boreham
8f27a81d90
Add a test for input errors
...
Send various malformed JSON strings into the decoder for each type,
and check we get an error each time.
2018-04-01 22:01:21 +00:00
Tao Wen
4930b053b8
explit test case sensitive for #252
2018-03-24 22:38:32 +08:00
Tao Wen
06e0f9391e
fix #250 case insensitive field match
2018-03-20 21:43:30 +08:00
Tao Wen
ca39e5af3e
suport encode map[interface{}]interface{}
2018-03-15 21:28:16 +08:00
Tao Wen
455b3f8bb8
move reflect2 from plz to modern-go
2018-02-28 17:09:30 +08:00
Tao Wen
9472474ffd
test []byte behavior
2018-02-27 12:04:11 +08:00
Tao Wen
fff342fd04
gofmt
2018-02-24 22:04:41 +08:00
Tao Wen
be70f29b04
detect remaining bytes
2018-02-22 10:37:32 +08:00
Tao Wen
99fc16a363
use reflect2 to replace reflect
2018-02-22 10:12:08 +08:00
Tao Wen
a3866383f5
support recursive struct
2018-02-21 17:59:41 +08:00
Tao Wen
2fcbb23d96
rewrite how eface and iface are handled
2018-02-21 12:16:50 +08:00
Tao Wen
ea6403326b
fix #239 , empty slice
2018-02-21 07:24:22 +08:00
Tao Wen
08218647c3
use reflect2 to implement map decoder
2018-02-19 22:53:42 +08:00
Tao Wen
d8e64aa825
support TextMarshaler as map key
2018-02-18 22:49:06 +08:00
Tao Wen
43d9384d67
fix marshaler support for iface case
2018-02-18 21:05:42 +08:00
Tao Wen
9dafbc667f
when embedded ptr is nil, the fields should be omitted
2018-02-16 17:32:41 +08:00
Tao Wen
a7a34507ab
use reflect2 for json.Marshaler
2018-02-16 15:42:37 +08:00
Tao Wen
0e2b54800a
remove EncodeInterface
2018-02-14 15:04:23 +08:00
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