Commit Graph

26 Commits

Author SHA1 Message Date
Masaaki Goshima 4167aefe08 Fix any bugs of encoder
- fix some issues (     )
- fix recursive call operation
- use json.Number of encoding/json
- fix encoding of MarshalJSON and MarshalText
- fix pointer operation
- remove 'anonymous' and 'only' operation
- add test cases for array/slice/map/marshaler
2021-03-11 19:29:35 +09:00
Masaaki Goshima 6eb23deb6f Fix decoding of embedded unexported pointer field 2021-02-18 17:46:28 +09:00
Masaaki Goshima 644ac4a692 Fix decoding of type of null string 2021-02-16 11:46:00 +09:00
Masaaki Goshima 3b7d5a6996 Remove unnecessary dependency on decoder 2021-02-11 00:33:54 +09:00
Masaaki Goshima 5227e49c39 Fix decoding of interface type 2021-02-09 21:37:18 +09:00
Masaaki Goshima 0c1e7c61e0 Fix algorithm of struct field detection 2021-02-06 20:07:01 +09:00
Masaaki Goshima aef2390074 Improve performance of streaming decoder 2021-02-06 14:24:07 +09:00
Masaaki Goshima 73a3af734f Add a new algorithm for decoding of struct field 2021-02-04 20:58:58 +09:00
Masaaki Goshima 3304ee45bf Optimize getting of cached decoder 2021-02-04 18:00:08 +09:00
Masaaki Goshima 2a0d4603ea Fix error output by golangci-lint 2021-02-01 22:32:45 +09:00
Masaaki Goshima ba4d7d2885 Fix []byte with unmarshaler 2020-12-24 14:26:18 +09:00
Masaaki Goshima b4a3ab8203 Fix rule of lower key 2020-12-23 01:28:56 +09:00
Masaaki Goshima 6506007b6c Fix decoding of embeded struct 2020-12-22 21:55:59 +09:00
Masaaki Goshima d7b9036e88 Fix overflow handling for int/uint decoder 2020-12-21 15:48:57 +09:00
Masaaki Goshima d88eb0986e Fix UnmarshalTypeError for int decoder 2020-12-15 12:29:19 +09:00
Masaaki Goshima 85577616f8 Support int and uint types as map key type 2020-12-12 18:09:46 +09:00
Masaaki Goshima ee52d7f0ae Fix double pointer 2020-12-07 10:44:24 +09:00
Masaaki Goshima 47b7f4a5a2 Fix decoding for UnmarshalJSON / UnmarshalText 2020-11-24 20:15:11 +09:00
Masaaki Goshima 5c82b00ee7 Add structName and fieldName argument to each constructor of decoder for UnmarshalTypeError 2020-11-23 17:16:31 +09:00
Masaaki Goshima f8eb061538 Fix decoder 2020-11-22 02:47:18 +09:00
Masaaki Goshima fd7a72c0b8 Pass unsafe.Pointer instead of uintptr 2020-11-19 12:47:42 +09:00
Cuong Manh Le 6b1d701387
Fix all invalid usages of unsafe.Pointer
Most of the invalid usages due to the conversion from uintptr to
unsafe.Pointer. In general, unsafe.Pointer(p) where p of type uintptr is
considered unsafe.

To fix that, use &p instead of p, then introduce another dereference.
Example, the invalid usage:

	*(*int)(unsafe.Pointer(p)) = int(v)

wil become:

	**(**int)(unsafe.Pointer(&p)) = int(v)

Closes 
2020-11-16 20:37:12 +07:00
Masaaki Goshima 99a5b20e5e Fix decoding of recursive type 2020-08-25 17:18:37 +09:00
Masaaki Goshima 74276c6af3 Fix decoder for string tag 2020-08-20 12:38:50 +09:00
Masaaki Goshima b3305a6306 Support decoding for uintptr type 2020-08-19 19:56:29 +09:00
Masaaki Goshima b4b79620aa Add stream decoder 2020-05-24 21:31:10 +09:00