Modified User's getSafeJSON.