Fixes most failing tests of the JSON module.