The config-loading function below parses untrusted JSON with no safeguards.
The bug: a JSON payload containing a "__proto__" key can pollute Object.prototype for the entire running process once merged into an existing object elsewhere in the app — turning a "just parse some JSON" operation into a vector for corrupting unrelated code, bypassing security checks, or crashing the server.
Your task: fix solve(json) so it parses the JSON and returns the result normally — but returns null instead if the parsed value (at any nesting level) contains a __proto__, constructor, or prototype key, or if the JSON is malformed.
Sample tests