Added function to json.dumps a value.