Making json module safer.