Luna::VariantUtils::read_json
R< Variant > read_json(const c8 *src, usize src_size=USIZE_MAX)
Parses one JSON string.
Parameters
-
in src
The JSON string to read.
-
in src_size
The maximum number of characters to read in
src
. The actual read chacaters may be small than this if the JSON string ends early.
If this value is greater than strlen(src)
, strlen(src)
will be used as the maximum number of characters to read instead of this value. So specifing USIZE_MAX will let the system detects the string length automatically.
Return value
Returns one variant that contains the data read from the JSON string.