Skip to main content

parse_object

Function parse_object 

Source
pub fn parse_object(text: &str) -> Option<Map<String, Value>>
Expand description

What: Parse record text into a JSON object, or nothing for any other document. Option<Map<String, Value>> is “an object, or nothing”. Why: Every record is an object; an array, a scalar or text that is not JSON is malformed.

In TS you’d write (pseudocode):

function parseObject(text: string): Record<string, unknown> | undefined;