1
0
mirror of https://github.com/json-iterator/go.git synced 2025-02-01 19:14:29 +02:00

37 Commits

Author SHA1 Message Date
李盼
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
a9b9c73b4d fix #207 delay unsupported type error reporting 2017-12-15 10:13:11 +08:00
Tao Wen
ff2b70c1db support config level extension 2017-11-23 00:09:35 +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
Tao Wen
faa3dcf46a do not report error when field is unexported 2017-09-19 10:06:34 +08:00
Oleg Shaldybin
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
Tao Wen
2066b01acb #146 support config TagKey 2017-08-22 00:12:09 +08:00
Tao Wen
3606750b83 document public symbols 2017-07-09 16:26:30 +08:00
Tao Wen
f0487718f6 document public symbols 2017-07-09 16:09:23 +08:00
Tao Wen
46574e7d09 document public symbols 2017-07-09 15:23:18 +08:00
Javier Provecho Fernandez
aaf6160146 fix(reflect): don't process ignored struct fields 2017-07-08 16:50:05 +02:00
Tao Wen
ed6c434851 gofmt 2017-07-02 11:56:01 +08:00
Tao Wen
e3ba0e7b7e #93 fix omitempty within embedded struct 2017-07-01 09:27:48 +08:00
Tao Wen
04eae11ba5 #91 fix one ptr embedded struct 2017-07-01 00:09:40 +08:00
Tao Wen
ea8fa7cc63 #91 fix embedded and , 2017-07-01 00:00:38 +08:00
Tao Wen
a3a2d1cd25 #87 fix embedded field sorting order 2017-06-30 14:01:50 +08:00
Tao Wen
401a56bc20 #88 #85 support embedded struct with json tags 2017-06-30 13:26:50 +08:00
Tao Wen
fb382c0ec1 fix -, 2017-06-29 20:40:07 +08:00
Tao Wen
09cb1d9236 #81 handle field name conflict properly 2017-06-29 20:34:40 +08:00
Tao Wen
a6673c983a slice embedded in struct will not be optimized by interface{} 2017-06-29 18:52:03 +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
4e608af2c7 #80 fix embedded builtins 2017-06-29 10:45:29 +08:00
Tao Wen
82dabdcdbf #77 support -, 2017-06-28 23:47:32 +08:00
Tao Wen
faaa59222a #79 fix string tag on string field 2017-06-28 23:37:10 +08:00
Tao Wen
8f8e16b4c2 #63 keep struct field order 2017-06-23 08:21:02 +08:00
Tao Wen
d7ea1acd3f #63 fix embed struct at last 2017-06-23 07:45:18 +08:00
Tao Wen
ff3c624fa9 fix anonymous fields 2017-06-21 00:26:18 +08:00
Tao Wen
3333ec11a0 support private fields 2017-06-20 23:48:41 +08:00
Tao Wen
486534c67c #67 time as int64 2017-06-20 17:43:47 +08:00
Tao Wen
ed79b1726e fix encoder/decoder cast issue 2017-06-20 17:01:21 +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
8f6a840c63 fix anonymous struct 2017-06-20 13:33:40 +08:00
Tao Wen
be221df432 #66 Make extension api like the java version 2017-06-20 10:41:54 +08:00
Tao Wen
499412ec4c #66 extract out feacture_reflect_extension 2017-06-20 08:42:36 +08:00