Given a JSON string, parse it and return the corresponding JavaScript value. Your implementation should handle all basic types and complex nested structures with proper error handling.
Requirements
1. Advanced Functionality
Handle deeply nested structures (10+ levels)
Properly unescape all special characters and escape sequences
Handle all number formats (integers, floats, negative, zero, scientific notation)
Preserve object key order
Handle mixed types in arrays
Proper whitespace handling
Better error messages
Example Usage
parse('{"a":{"b":{"c":{"d":{"e":1}}}}}');// Deep nestingparse('"text with \"quotes\" and \\backslashes"');// Complex escapingparse('[1,"two",true,null,{"x":1}]');// Mixed typesparse('{"0":"zero","1":"one"}');// Numeric keys
Real-World Context
This problem models real JSON parsing in production:
Complex API responses: Parse deeply nested API data