Commit Graph

29 Commits

Author SHA1 Message Date
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 #53
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 27f6c70ab3 Fix DisallowUnknownFields 2020-08-14 17:59:49 +09:00
Masaaki Goshima e112aa753e Support DisallowUnknownFields 2020-08-11 19:05:20 +09:00
Masaaki Goshima f9ffbb1940 Support json.Number 2020-08-11 18:04:32 +09:00
Masaaki Goshima 66b0490583 Support InputOffset 2020-07-31 20:31:14 +09:00
Masaaki Goshima 80acd42b80 Optimize streaming decoder 2020-07-31 17:10:03 +09:00
Masaaki Goshima 961b6a202e Add benchmark for stream decoding 2020-07-31 12:22:00 +09:00
Masaaki Goshima 20b67ad48d Support Decoder.Token 2020-07-30 22:41:53 +09:00
Masaaki Goshima b4b79620aa Add stream decoder 2020-05-24 21:31:10 +09:00
Masaaki Goshima 4acc22e0fe Support SyntaxError 2020-05-23 12:51:09 +09:00
Masaaki Goshima e562358cdf Removed dependency on xerrors 2020-05-09 01:49:37 +09:00
Masaaki Goshima d8d711ecf9 Add error type compatible with encoding/json 2020-05-09 01:07:33 +09:00
Masaaki Goshima a979b83d27 Add noescape trick for decoding 2020-05-09 00:00:08 +09:00
Masaaki Goshima bb169a5cf6 Support UnmarshalText for decoding 2020-05-08 20:25:49 +09:00
Masaaki Goshima c23e5f43a7 Support UnmarshalJSON 2020-05-08 20:22:57 +09:00
Masaaki Goshima 9fe0063679 Support interface{} type for decoding 2020-05-08 15:13:30 +09:00
Masaaki Goshima f198ef6517 Remove context for decoding 2020-05-07 02:37:29 +09:00
Masaaki Goshima 82e8cc766f Fix decoderMap interface 2020-05-06 22:22:13 +09:00
Masaaki Goshima 3b27b5f267 Use sync.Map for caching of decoder 2020-04-28 18:35:08 +09:00
Masaaki Goshima f36e24c8ae Add decoder for map type 2020-04-25 22:48:16 +09:00
Masaaki Goshima 71d6f845e5 Add decoder for Array or Slice type 2020-04-25 19:55:05 +09:00
Masaaki Goshima 24447ce7e9 Add UnmarshalNoEscape 2020-04-24 21:57:11 +09:00
Masaaki Goshima 015eb040ee Add reflect.rtype trick 2020-04-24 20:23:26 +09:00
Masaaki Goshima cfde002d29 Add decoder of float 2020-04-24 16:46:12 +09:00
Masaaki Goshima 508e4e4dcc Refactor decoder 2020-04-24 01:39:20 +09:00
Masaaki Goshima 416d1cf552 Support decoding for bool type 2020-04-22 18:51:42 +09:00
Masaaki Goshima 0c42c47179 Refactor decoder 2020-04-22 17:59:01 +09:00
Masaaki Goshima 2c11838fe3 Add decoder 2020-04-22 13:06:52 +09:00