Your question is Convert String to JSON. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Amazon Echo Show configuration services exchange settings as JSON text. Implement a parser that converts a valid JSON object string into the equivalent nested Python object without calling json.loads or another JSON parsing library.
Implement parse_json(s), where s is a string containing one complete JSON object. Return a Python dictionary with nested dictionaries, lists, strings, integers, floating-point values, booleans, and None values matching the JSON structure. Ignore whitespace between tokens. You may raise ValueError for malformed input, although test inputs are valid.
Support JSON objects, arrays, strings, numbers, true, false, and null. String escapes must include \", \\, \/, \b, \f, , \r, \t, and \uXXXX.
def parse_json(s):