Properly handle json.