Init res as `""` or
```
if (IsValid()) {
  return data_.serialize();
} else if (!error_.get<picojson::object>().empty()) {
  return error_.serialize();
} else {
  return "";
}
```