uce/site/doc/pages/2_DValue_to_json.txt
2026-06-15 21:42:50 +00:00

18 lines
570 B
Plaintext

:sig
String DValue::to_json(char quote_char = '"') const
:params
quote_char : quote character passed to string escaping
return value : JSON-ish scalar representation
:see
0_DValue
json_encode
:content
Returns the JSON scalar representation used by this low-level method: strings are escaped and quoted, numbers are emitted with `std::to_string`, bools as `true`/`false`, maps as `"(array)"`, pointers as `"(pointer)"`, and references as `"(reference)"`. For full structured encoding, use the runtime JSON helpers.
```cpp
print(context.props["title"].to_json());
```