rest input needs to be converted to JSON prior to sending, otherwise we send as form data and types are not retained (e.g. integers come through as strings)