File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,14 +2,16 @@ module decoder2
22
33import x.json2
44
5+ // decode decodes a JSON string into a specified type.
56@[deprecated: '`decode` has been moved to `x.json2`, use `decode` from `x.json2` instead' ]
67@[deprecated_after: '2025-10-12' ]
7- fn decode [T](val string ) ! T {
8- return json2 .decode[T](val)
8+ pub fn decode [T](val string ) ! T {
9+ return json2 .decode[T](val)!
910}
1011
11- @[deprecated: '`decode` has been moved to `x.json2`, use `decode` from `x.json2` instead' ]
12+ // decode_array decodes a JSON string into a specified type. This is the same as decode.
13+ @[deprecated: '`decode_array` has been moved to `x.json2`, use `decode` from `x.json2` instead' ]
1214@[deprecated_after: '2025-03-18' ]
13- fn decode_array [T](src string ) ! T {
14- return json2 .decode[T](src)
15+ pub fn decode_array [T](src string ) ! T {
16+ return json2 .decode[T](src)!
1517}
You can’t perform that action at this time.
0 commit comments