d2a7335211
fix #202 #203 #204 map encoder not proplery initialized
2017-12-08 21:18:59 +08:00
b2a706d14b
reverse last commit, need a better fix
2017-12-08 06:15:49 +08:00
23078876c5
fix #203 consider MarshalJSON as non empty
2017-12-07 23:20:43 +08:00
051434fab7
fix #198 , use dep for vendoring
2017-11-30 10:42:24 +08:00
be6688fc1a
fix #200 , do not use symbolic link in the code
2017-11-30 10:34:05 +08:00
ff2b70c1db
support config level extension
2017-11-23 00:09:35 +08:00
f7279a603e
fix out of range
1.0.4
2017-11-15 23:34:21 +08:00
9f088cbcc4
fix #195 when decode float as int, report it clearly
2017-11-15 23:25:12 +08:00
3c0e5762c4
fix #196 do not hard code 1 << 49
2017-11-15 23:15:31 +08:00
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
9fddff05f0
try to fix #194 with larger array
2017-11-11 08:31:44 +08:00
b1b003864e
expose OptionalEncoder&OptionalDecoder; add attachment to Stream&Iterator for customized decoder/encoder
2017-11-08 11:41:45 +08:00
aed5a81f09
fix #190 handle empty input
2017-10-31 22:47:02 +08:00
f1258b01aa
fix #191 do not always assume the object field is simple string
2017-10-31 22:38:41 +08:00
fbd210edfc
Merge pull request #189 from ggaaooppeenngg/compatible-with-map
...
Fix standard compatiblility
2017-10-26 18:39:38 -05:00
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
06b2a7cf1d
Merge pull request #188 from ggaaooppeenngg/compatible
...
Fix standard compatiblility
2017-10-26 06:41:01 -05:00
5fffb9b8f7
Fix standard compatiblility
...
Encode has trailing newline at the end.
Signed-off-by: Peng Gao <peng.gao.dut@gmail.com >
2017-10-26 15:15:36 +08:00
7e3b776024
change jsoniter-sloppy to jsoniter_sloppy
2017-10-23 15:03:44 +08:00
6240e1e798
#185 add jsoniter.Valid
1.0.3
2017-10-10 08:57:02 +08:00
0149a5cf4a
fix #183 error message not only show expectation, but also the actual value
2017-10-09 08:24:51 +08:00
5068c8baaf
#183 limit error message size
2017-10-09 08:16:52 +08:00
16f78601b5
fix #184 , support null as number
2017-10-07 09:29:32 +08:00
8f50a91be2
fix #181 , support string as json.Number and jsoniter.Number
2017-10-06 18:08:14 +08:00
73c7bc881e
fix #180 , add missing methods to jsoniter.Number
2017-10-06 17:56:36 +08:00
4de15a3a87
Merge pull request #182 from MOZGIII/patch-1
...
Used writeTwoBytes in Stream.WriteEmptyArray
2017-10-04 02:25:32 -05:00
14b28b2226
Used writeTwoBytes in Stream.WriteEmptyArray
2017-10-03 22:14:36 +03:00
abe3c4016b
fix #179
2017-09-26 15:35:55 +08:00
dbb1ef3f63
#177 flush buffer should check available again
2017-09-21 21:04:45 +08:00
46b20bbbec
#178 SkipAndReturnBytes should return copy of memory
2017-09-21 20:18:45 +08:00
fdfe0b9a69
Merge branch 'olegshaldybin-skip-unexported-fields'
2017-09-19 10:06:59 +08:00
faa3dcf46a
do not report error when field is unexported
2017-09-19 10:06:34 +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
6ed27152e0
Update README.md
1.0.2
2017-09-17 16:07:42 +08:00
3c298d8a76
Merge pull request #172 from olegshaldybin/more-stdlib-compat
...
Improve stdlib compatibility
2017-09-17 03:05:36 -05:00
9f6e5962a9
Improve stdlib compatibility
...
1. Null values for primitive types no longer clear the original value in
the destination object.
2. Dereference multiple levels of pointers in the destination interface{}
type before unmarshaling into it. This is needed to match stdlib
behavior when working with nested interface{} fields. If the destination
object is a pointer to interface{} then the incoming nil value should
nil out the destination object but keep the reference to that nil value
on its parent object. However if the destination object is an
interface{} value it should set the reference to nil but keep the
original object intact.
3. Correctly handle typed nil decode destinations.
2017-09-16 16:57:51 -07:00
c463aa12c4
Merge pull request #173 from toffaletti/more-nil-interface-fixes
...
More nil interface fixes
2017-09-16 18:36:43 -05:00
b5d2607a6d
replace should.Equal(nil, err) with should.NoError(err)
2017-09-16 16:30:04 -07:00
48cc4d965a
improve test
2017-09-16 16:27:32 -07:00
c59c42fda0
fix decoding of nil non-empty interface
2017-09-16 16:24:55 -07:00
8324374402
add tests for decoding nil interfaces
2017-09-16 16:24:27 -07:00
2017f3866b
fix encoding of nil marshaler interface
2017-09-16 16:08:32 -07:00
ddc5af4512
fix encoding of nil non-empty interface
2017-09-16 16:04:36 -07:00
2f7e5c8dd7
add failing tests for nil non-empty interfaces
2017-09-16 16:00:48 -07:00
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
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
eef35e549b
Merge pull request #169 from toffaletti/fix-nil-interface
...
Fix handling of nil empty interface
2017-09-15 00:45:11 -05:00
005d86dc44
fix handling of nil empty interface
2017-09-14 21:32:42 -07:00
e658f6597a
add failing test for handling of nil interface with omitempty
2017-09-14 20:44:42 -07:00
f8eb43eda3
Merge pull request #168 from olegshaldybin/null-booleans
...
Allow null booleans
2017-09-14 20:58:31 -05:00