Commit Graph

89 Commits

Author SHA1 Message Date
Nao Yonashiro af33c47846 fix: determining embedded structs was wrong
fix #362
2022-04-26 14:16:28 +09:00
Nao Yonashiro 6911114fb4 fix: to care surrogate-pair on stringDecoder
fix #364
2022-04-26 01:40:44 +09:00
Nao Yonashiro 6db1acfcb6 fix: to care about the case of OpInterfacePtr
fix #359
2022-04-22 00:38:20 +09:00
Nao Yonashiro d9df77a119 fix: add a fallback uint8 sliceDecoder to bytesDecoder
fix #360
2022-04-07 18:10:49 +09:00
Nao Yonashiro 4235ca04c0 fix: an incompatible behavior on map key decoder
fix #342
The map key decoder has an incompatible behavior when the type kind is string and the type has UnmarshalJSON.
2022-03-24 09:35:14 +09:00
Nao Yonashiro 8c27bb4f29
Merge branch 'master' into fix/#348 2022-03-19 21:29:50 +09:00
Nao Yonashiro 6832682204 fix: mismatched between len(s.buf) and s.bufSize
close #348
2022-03-18 23:31:33 +09:00
Nao Yonashiro 1ee186da17 test: add benchmark 2022-03-13 08:20:12 +09:00
Nao Yonashiro fdd32cccf2 test: adds ints boundary cases 2022-03-12 23:41:52 +09:00
Nao Yonashiro 81519c48d8 fix: avoid reading the next character in buffer to nul consideration
fix #337
2022-02-22 19:22:48 +09:00
Nao Yonashiro c05e1e23ee fix: panic when decoding time.Time with context
close #327
2022-01-26 01:02:27 +09:00
Masaaki Goshima 50b494bc5f
Fix logic of removing struct field for decoder 2022-01-14 20:18:18 +09:00
Masaaki Goshima b5a50f75eb
Add invalid decoder to delay type error judgment at decode 2022-01-13 18:09:48 +09:00
Masaaki Goshima d494b03b74 Fix decoding of map type that contains indirect element type 2021-08-31 12:21:08 +09:00
Masaaki Goshima 8f5f28614c Add test case 2021-08-30 11:39:27 +09:00
Masaaki Goshima 08c2e1abef Improve error message 2021-08-13 17:05:07 +09:00
Masaaki Goshima 75a6ad40b9 Fix decoding of binary type with escaped char 2021-08-12 13:52:00 +09:00
Kiraub 9d9e5cd11a inline nilfunc to nil comparison 2021-06-23 19:10:00 +02:00
ebauer d34d79600a add func Unmarshal tests 2021-06-23 14:22:58 +02:00
IncSW 94cecc0609
update tests 2021-06-15 19:10:56 +03:00
Masaaki Goshima cd7fb7392f Support context for MarshalJSON and UnmarshalJSON 2021-06-12 17:06:26 +09:00
Masaaki Goshima 14c828aad7 Add test case for stream decoder 2021-06-02 19:01:41 +09:00
Masaaki Goshima c128c8c915 Fix decoding fields containing escaped characters 2021-06-02 17:23:32 +09:00
Masaaki Goshima 90d4d18dbf Keep original reference of slice element
- If the entered slice length is greater than zero, copy all references to the shared slice.
2021-05-20 02:04:52 +09:00
Masaaki Goshima 33f2568d47 Refactor validator for null/true/false 2021-05-09 03:05:36 +09:00
Masaaki Goshima 78e2bf2502 Fix decoding of slice element 2021-05-07 21:31:35 +09:00
Masaaki Goshima 51905367ec
Merge pull request #200 from IncSW/slice-decoding-compatibility
when cap is enough, reuse slice data for compatibility with encoding/json
2021-05-03 17:11:43 +09:00
Masaaki Goshima f341b31ea5 Fix decoding of backslash char at the end of string 2021-05-02 16:02:14 +09:00
Masaaki Goshima fb6151f556 Fix decoding of null value to []byte by json.Unmarshal 2021-05-02 15:26:36 +09:00
Masaaki Goshima 275aade00d Fix decoding of null value for interface type that does not implement Unmarshaler 2021-05-02 03:36:58 +09:00
Masaaki Goshima 75b72584a5 Use typedmemmove for copying element of slice 2021-05-01 14:53:48 +09:00
IncSW 2ad2f11326
when cap is enough, reuse slice data for compatibility with encoding/json 2021-04-30 19:09:15 +03:00
Masaaki Goshima e647dafb41 Fix decoding of slice with unmarshal json type 2021-04-30 22:55:08 +09:00
Masaaki Goshima dc2d025d2a Add test case 2021-04-30 04:01:51 +09:00
Masaaki Goshima 50bf5148f3 Fix decoder for invalid number value 2021-04-11 15:18:08 +09:00
Masaaki Goshima 2cb792ca28 Fix decoding of invalid top level value 2021-04-10 18:44:43 +09:00
Masaaki Goshima e38c3606b3 Fix decoding of slice pointer type 2021-03-29 02:28:04 +09:00
Masaaki Goshima a06b2c5f60 Support coerce invalid utf8 char 2021-03-25 00:24:53 +09:00
Masaaki Goshima 3a0fba4bdb Fix invalid string option 2021-03-24 19:09:33 +09:00
Masaaki Goshima e0812246ef Fix test code for debug 2021-03-18 18:29:18 +09:00
Masaaki Goshima 4cdbd4e962 Remove unnecessary code 2021-03-12 00:43:48 +09:00
Masaaki Goshima 4167aefe08 Fix any bugs of encoder
- fix some issues ( #104 #118 #144 #147 )
- 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 23c5766bd2 Add test case 2021-02-18 19:11:44 +09:00
Masaaki Goshima f8fd59516b Fix decoding of deep recursive structure 2021-02-18 19:05:06 +09:00
Masaaki Goshima 35eee537d4 Add test case 2021-02-18 17:59:29 +09:00
Masaaki Goshima 6eb23deb6f Fix decoding of embedded unexported pointer field 2021-02-18 17:46:28 +09:00
Masaaki Goshima cf6cf56e3d Fix invalid test case 2021-02-18 16:49:51 +09:00
Masaaki Goshima 0288026fde Fix decoding of invalid value 2021-02-18 16:42:38 +09:00
Masaaki Goshima 91c53cd3f7 Fix decoding of prefilled value 2021-02-18 12:13:49 +09:00
Masaaki Goshima b2a7d22fb4 Fix not being able to return UnmarshalTypeError when it should be returned 2021-02-18 11:32:08 +09:00