Skip to content

Commit 69a0ec3

Browse files
authored
json2: make the deprecated decoder2 fns public (#25498)
1 parent 8342968 commit 69a0ec3

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎vlib/x/json2/decoder2/stub.v‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,16 @@ module decoder2
22

33
import 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
}

0 commit comments

Comments
 (0)