Commit Graph

84 Commits

Author SHA1 Message Date
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
Masaaki Goshima 5351464001 Fix decoding of null value 2021-02-17 01:51:42 +09:00
Masaaki Goshima e09027425c Use pre allocated pointer if exists it 2021-02-17 00:03:07 +09:00
Masaaki Goshima 644ac4a692 Fix decoding of type of null string 2021-02-16 11:46:00 +09:00
Nao Yonashiro 10de43128b test: add test case of decode escaped string to empty interface 2021-02-12 18:12:40 +09:00
Masaaki Goshima 6befcb123e Fix decoding of interface type 2021-02-09 22:13:58 +09:00