Revert "Revert "Updates JSON correctly""

This reverts commit 0e8b6ea3ebf7611743d2cec2778f3a91e7e326e0.