Fix all the tests on beta


* compare using JSON library for more robust testing