Revert changes from commit c5f1eed17f5d6 and use built-in JSON library