Commit graph

147 commits

Author SHA1 Message Date
Ichito Nagata
4c791524fb tweak error messages to be more descriptive 2020-09-19 08:06:17 +09:00
Masaaki Goshima
23d3128925 Support io.Reader interface on ast.Node 2020-07-15 22:16:27 +09:00
Masaaki Goshima
fc5218d9f3
Merge pull request #151 from goccy/feature/support-decoding-of-tag-and-map-key
Support decoding of canonical yaml
2020-07-15 22:05:07 +09:00
itai Schwartz
f1ce598f9b fix disallowUnknownField with struct validation 2020-07-12 19:02:23 +03:00
Masaaki Goshima
152a6fb581
Merge pull request #147 from itaischwartz/bugfix/fix-nested-struct-validation
Fix nested struct validation
2020-07-03 20:26:26 +09:00
itai Schwartz
4e9286dc7d Replace ok -> exists in one more check 2020-07-03 13:28:59 +03:00
itai Schwartz
952ee495a9 Rename exist -> exists 2020-07-03 13:26:05 +03:00
itai Schwartz
c5dcf09879 Align with library conventions 2020-07-03 13:24:06 +03:00
Masaaki Goshima
f00b223dfd Add test case for decoding of canonical yaml 2020-07-02 17:26:35 +09:00
itai Schwartz
a2c87f7011 check if structField exists on validation 2020-06-28 22:16:03 +03:00
Masaaki Goshima
3b54bfbc6e Fix TextUnmarshaler and BytesUnmarshaler 2020-06-23 12:39:50 +09:00
Masaaki Goshima
80e0e8a66f Fix encoding when last node is literal 2020-06-16 22:37:59 +09:00
Masaaki Goshima
597cf26773 Fix recursive alias 2020-06-15 13:48:17 +09:00
Masaaki Goshima
30937a2979 Fix handling of value node corresponding to MergeKey 2020-06-15 12:14:02 +09:00
Masaaki Goshima
a56d78cbf1 Fix processing of MergeKeyNode 2020-06-11 20:58:37 +09:00
Masaaki Goshima
f9107996ab Fix column number at resolving of alias node 2020-06-11 20:40:27 +09:00
Masaaki Goshima
97e839c933 Resolve alias node before calling UnmarshalYAML([]byte) 2020-06-11 19:42:23 +09:00
Masaaki Goshima
c0e22be039 Fix reflection error in deleteStructKeys 2020-06-09 10:36:35 +09:00
Masaaki Goshima
4013d13463 Support decoding with DisallowDuplicateKey option for struct 2020-06-08 23:34:34 +09:00
Masaaki Goshima
3eacf18ea8 Fix panic at decoding of inlining pointer type with DisallowUnknownField option 2020-06-08 23:06:16 +09:00
Masaaki Goshima
e95f2fb21d Fix panic: reflect: call of reflect.Value.Interface on zero Value 2020-06-01 17:31:07 +09:00
Masaaki Goshima
2288b1c448 Support DisallowDuplicateKey and Strict option for Decoder 2020-06-01 17:26:27 +09:00
Masaaki Goshima
68532a40e3 Support stream decoding 2020-06-01 16:14:20 +09:00
Masaaki Goshima
fe875b3705 Add UseOrderedMap option 2020-05-29 19:47:47 +09:00
Masaaki Goshima
ae7001787c Support decoding for MapItem and MapSlice 2020-05-28 17:30:19 +09:00
Masaaki Goshima
233a9d3e94 Support decoding for struct field with inline and alias 2020-03-02 22:55:57 +09:00
Masaaki Goshima
539e14a7fd Add ignoreMergeKey argument for MergeKey in struct 2020-03-02 22:53:33 +09:00
Masaaki Goshima
34a82823ba Prevent overwrite anchor value 2020-03-02 22:51:53 +09:00
Masaaki Goshima
6dca3ab58f Fix decoding of MergeKey 2020-03-02 16:18:13 +09:00
k1LoW
0b3ce0180a Distinguish between empty ptr value (e.g. *int, *string) and nil ptr value 2020-02-22 11:46:09 +09:00
Masaaki Goshima
609746c0b5
Merge pull request #74 from kyoh86/text-marshal
Support encoding.TextMarshaler/TextUnmarshaler
2020-02-14 17:53:13 +09:00
Kyoichiro Yamada
8c0eb326e4 move decode tests to decode_test.go 2020-01-14 22:50:50 +09:00
Kyoichiro Yamada
b759dca4f7 merge decode unmarshalable tests 2020-01-14 21:44:48 +09:00
Kyoichiro Yamada
a31d3eb009 use Sprint instead of .(string) cast 2020-01-14 21:43:03 +09:00
Kyoichiro Yamada
a59c1d6d35 don't quote string before unmarshal text 2020-01-12 22:37:09 +09:00
Kyoichiro Yamada
9206db8998 fix #75 2020-01-12 22:28:44 +09:00
Kyoichiro Yamada
81b7b6d4a7 support encoding.TextMarshaler and encoding.TextUnmarshaler 2020-01-12 02:50:51 +09:00
Masaaki Goshima
7a0a7ff186 Reuse decoded value for alias 2020-01-09 21:49:52 +09:00
Masaaki Goshima
a2fad62bcb Improve performance ( use io.Copy to read from io.Reader ) 2019-12-29 02:04:39 +09:00
Masaaki Goshima
342b3de34d Improve performance ( reduce allocation for map value at decoding ) 2019-12-29 00:06:46 +09:00
kitagawa
3032e43e20 Fix error and Refactoring 2019-12-18 13:26:59 +09:00
kitagawa
5ce623a5f1 fix error handling 2019-12-17 10:51:46 +09:00
kitagawa
247e7f498c Refactoring 2019-12-16 23:30:53 +09:00
kitagawa
7ae4096801 Merge branch 'master' into fix-disallow-unknown-field 2019-12-14 14:45:14 +09:00
kitagawa
988dcde13f Restore syntaxErr 2019-12-14 14:35:58 +09:00
Masaaki Goshima
61467027bd Supports default value in decoding for struct 2019-12-14 11:55:23 +09:00
kitagawa
a583826275 wrap error 2019-12-13 15:11:36 +09:00
kitagawa
3ba8abd35a Fix test case. 2019-12-13 15:00:04 +09:00
kitagawa
5b44bcd216 Fix disallowUnknownField for inline struct 2019-12-13 13:33:56 +09:00
kitagawa
e8ac292cc6 Fix variable's name and delete escape 2019-12-11 15:42:22 +09:00