Fine to just return `$struct` here; internal users can use `json_ensure_response`.