Maybe it's better to use `json_encode` here as well to be consistent.