refactor: rename DTree to DValue
This commit is contained in:
@@ -1,21 +1,21 @@
|
||||
:sig
|
||||
DTree json_decode(String s)
|
||||
DValue json_decode(String s)
|
||||
|
||||
:params
|
||||
s : string containing JSON data
|
||||
return value : a DTree object containing the deserialized JSON data
|
||||
return value : a DValue object containing the deserialized JSON data
|
||||
|
||||
:see
|
||||
0_DTree
|
||||
0_DValue
|
||||
json_encode
|
||||
to_bool
|
||||
to_f64
|
||||
to_u64
|
||||
|
||||
:content
|
||||
Deserializes `s` into a `DTree` structure.
|
||||
Deserializes `s` into a `DValue` structure.
|
||||
|
||||
The returned structure is usually consumed through `DTree` accessors such as:
|
||||
The returned structure is usually consumed through `DValue` accessors such as:
|
||||
|
||||
- `tree["key"].to_string()`
|
||||
- `tree["count"].to_u64()`
|
||||
@@ -23,10 +23,10 @@ The returned structure is usually consumed through `DTree` accessors such as:
|
||||
|
||||
Current runtime behavior:
|
||||
|
||||
- JSON objects and arrays become map-shaped `DTree` values.
|
||||
- JSON booleans become native `bool` `DTree` values.
|
||||
- JSON strings become native `String` `DTree` values.
|
||||
- JSON numbers currently deserialize as string-valued `DTree` nodes, so typed conversions such as `to_f64()` and `to_u64()` are the normal way to read numeric content.
|
||||
- JSON objects and arrays become map-shaped `DValue` values.
|
||||
- JSON booleans become native `bool` `DValue` values.
|
||||
- JSON strings become native `String` `DValue` values.
|
||||
- JSON numbers currently deserialize as string-valued `DValue` nodes, so typed conversions such as `to_f64()` and `to_u64()` are the normal way to read numeric content.
|
||||
|
||||
Related:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user