Fix JSON smoke test

 - Simplify encoding example because hashes are unordered.
 - Fix broken require