No, I was talking about output ports. The proposed procedure allows
1) writing JSON values larger than memory
2) pretty-printing (adding extra whitespace yourself)
3) printing valid elements of a JSON sequence as mentioned in the other issue)
3) perhaps most important, constructing different parts of the JSON by independent parts of the program, just as plain output ports allow constructing different parts of a text document.
It maintains a stack that is pushed whenever an object or array is opened. Whenever an array or object is closed, pop the stack and validate that the close matches the current open.
A bad point is that allows printing incomplete JSON, but this trades off against all the other points. The main JSON writer should be sure to validate everything before printing anything.