Commit Graph

76 Commits

Author SHA1 Message Date
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
Masaaki Goshima 6e154ee727 Fix decoding of escape char at UnmarshalJSON 2021-01-30 02:03:31 +09:00
Masaaki Goshima 06e2230d8d Fix decoder by using checkptr flag 2020-12-24 21:52:40 +09:00
Masaaki Goshima 22ef64f4a5 Add test cases 2020-12-24 20:08:27 +09:00
Masaaki Goshima 8628848924 Fix decoding of []byte type 2020-12-24 19:36:49 +09:00
Masaaki Goshima 048ba8296d Add all unmarshal test cases 2020-12-24 18:58:34 +09:00
Masaaki Goshima 66b1c768fe Add error handling for unmarshal text 2020-12-24 18:45:26 +09:00
Masaaki Goshima 23290f4ce4 Fix error case 2020-12-24 18:30:11 +09:00
Masaaki Goshima 080bd5e4eb Fix UnmarshalTypeError 2020-12-24 17:47:53 +09:00