This commit is contained in:
root
2026-06-15 21:42:50 +00:00
parent 34a97e2577
commit 99cd92fb4a
126 changed files with 1615 additions and 1057 deletions
+19
View File
@@ -0,0 +1,19 @@
:sig
bool DValue::is_list() const
:params
return value : true when the value is an array with keys 0..n-1
:see
0_DValue
2_DValue_set_array
2_DValue_push
:content
Returns true for map-shaped values that represent a list. An empty map is a list only if it was explicitly put in list mode with `set_array()` or by list operations. Non-empty lists must have canonical numeric string keys from `0` through `size - 1`.
```cpp
DValue first; first = "first";
DValue items; items.set_array(); items.push(first);
if(items.is_list()) print(json_encode(items));
```