verified correctness of my Json SO post