Making the JSON valid