Function rhai::format_map_as_json

source ·
pub fn format_map_as_json(map: &Map) -> String
Expand description

Return the JSON representation of an object map.

Not available under no_std.

This function can be used together with Engine::parse_json to work with JSON texts without using the serde_json crate (which is heavy).

Data types

Only the following data types should be kept inside the object map: INT, FLOAT, ImmutableString, char, bool, (), Array, Map.

Errors

Data types not supported by JSON serialize into formats that may invalidate the result.