There is a pre-defined error for an error decoding JSON, but none for if there is an error encoding the JSON