(task) JSON editable, handling invalid JSON and sending correct payload to API