JSON parser

Write codeHard40 minStripe style

Your task

Implement a minimal JSON parser. Parse a string containing a JSON value built only from: objects with string keys, arrays, double-quoted strings (no escape sequences beyond " and \), integers, the literals true, false, null, and arbitrary whitespace between tokens. Return the corresponding Python value (dict, list, str, int, bool, or None). The input is always well-formed.

Examples

parse_json(s: str) -> any
Example 1
Inputparse_json("{\"a\": 1, \"b\": [true, null, \"hi\"]}")
Output{"a": 1, "b": [True, None, "hi"]}