Poorly constructed question


#1

The question Implies that all inputs are legal JSON objects and all the user needs to do is pretty print them. That is obviously not the case. HINT 1 puts the REAL problem to the spotlight. This is a linting (parsing) problem and that is extremely more difficult.
The first example given in the question is not even a legal JSON syntax. (all strings must be quoted, that includes the keys of the object).

Since there is no REAL interviewer to ask “are the input legal?”, you should add this assumption to the question description, and according to that also build the tests.