a9b9c73b4d
fix #207 delay unsupported type error reporting
2017-12-15 10:13:11 +08:00
1f58120d43
Always skip unexported fields when encoding
...
Skip creating encoders for unexported fields. They are not participating
in JSON marshaling anyway. This allows using unexported fields of
non-marshalable types in structs.
As a side-effect of this change it's no longer possible to marshal
unexported JSON fields by adding a custom type extenstion. It seems this
is desired behavior since it matches standard library and jsoniter
already disallows `json:"-"` fields from participating in custom
extensions.
Fixes #174 .
2017-09-18 11:02:15 -07:00
db32ee8c2d
#157 number can be null
2017-09-05 13:00:03 +08:00
d80309af3b
#156 invoke Marshaler defined on pointer types
2017-09-01 15:44:12 +08:00
2dc0031b26
#152 gofmt
2017-08-25 12:53:23 +08:00
cdbd2ed810
#145 interface {} customizatoin is recursive
2017-08-22 10:39:01 +08:00
2066b01acb
#146 support config TagKey
2017-08-22 00:12:09 +08:00
ac3b3cd160
test []interface{}
2017-08-21 22:43:51 +08:00
f0487718f6
document public symbols
2017-07-09 16:09:23 +08:00
b74ffb2e03
import github.com/stretchr/testify/require
2017-07-07 09:13:25 +08:00
bf002a02be
#102 create correct type when pointer to Marshaler/Unmarshaler is nil
2017-07-02 11:35:30 +08:00
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
abcf9a8d76
fix tests
2017-07-01 00:35:19 +08:00
fa0965a968
#90 trim spaces when UnmarshalJSON
2017-07-01 00:33:42 +08:00
486534c67c
#67 time as int64
2017-06-20 17:43:47 +08:00
ed79b1726e
fix encoder/decoder cast issue
2017-06-20 17:01:21 +08:00
8f6a840c63
fix anonymous struct
2017-06-20 13:33:40 +08:00
be221df432
#66 Make extension api like the java version
2017-06-20 10:41:54 +08:00
14588726a1
expose ValEncoder & ValDecoder
2017-06-20 08:08:59 +08:00
43a832beee
add isEmptyFunc
2017-06-20 07:57:23 +08:00
8367a97ad8
gofmt
2017-06-20 07:39:54 +08:00
839247df05
#63 fix Marshaler and Unmarshaler on struct
2017-06-20 07:23:22 +08:00
31afe6450e
add Api interface to allow save the frozen config
2017-06-19 13:43:22 +08:00
b31b1301e2
#59 add ConfigFastest
2017-06-17 10:21:37 +08:00
5f22e50c89
#53 support escapeHtml
2017-06-15 23:55:04 +08:00
d867c8ba5c
#53 split config into Config and frozenConfig
2017-06-13 18:49:35 +08:00
d0418857ce
#53 move current config EnableXXX
2017-06-13 17:47:40 +08:00
acddcf5bbf
#53 extract out config
2017-06-13 16:58:53 +08:00
cfffa29c8a
gofmt
2017-06-06 23:27:00 +08:00
a4e5abf492
support []byte; marshal without copy
2017-06-06 09:44:56 +08:00
e36f926072
fix random go test failure
2017-06-02 17:34:40 +08:00
707ed3b091
support non empty interface
2017-05-27 00:36:21 +08:00
f20f74519d
RegisterTypeEncoder and RegisterTypeDecoder should have higher priority
2017-05-24 23:39:34 +08:00
7d2ae80c37
#27 support json.Unmarshaler
2017-05-24 16:04:11 +08:00
f6f159e108
#27 support json.Marshaler
2017-05-24 14:34:00 +08:00
7d5f90261e
#28 extension should support specifying encoder
2017-05-24 10:58:56 +08:00
6126a6d3ca
#23 hide unexported fields by default
2017-05-24 09:39:11 +08:00
5fbe4e387d
#21 #22 marshal float precisely by default
2017-05-24 09:08:15 +08:00
1df353727b
customize []byte encoder
2017-05-06 20:52:36 +08:00
6bd835aeb1
test type encoder
2017-05-05 08:22:19 +08:00
d63a00f0bf
Formated, doced. Also fixed few minor bugs.
2017-01-05 21:23:08 +08:00
97849e019f
fix read any; reuse existing obj for optional
2017-01-05 13:53:38 +08:00
7d5f2aed7b
update extension
2016-12-17 17:38:13 +08:00
9fe4625ee2
support customize all fields
2016-12-12 19:06:33 +08:00
b0b1af4b3b
rename
2016-12-05 13:41:20 +08:00