Skip to content

Commit

Permalink
jsonrpc: handle non-unicode byte sequences
Browse files Browse the repository at this point in the history
  • Loading branch information
jesec committed Apr 11, 2021
1 parent 67ea6ec commit 4a9b089
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/utils/jsonrpc/server.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,11 @@ class JsonRpc2Server : public JsonRpcServer {
result.push_back(std::move(res));
}
}
return result.dump();
return result.dump(-1, ' ', false, json::error_handler_t::replace);
} else if (request.is_object()) {
json res = HandleSingleRequest(request);
if (!res.is_null()) {
return res.dump();
return res.dump(-1, ' ', false, json::error_handler_t::replace);
} else {
return "";
}
Expand Down

0 comments on commit 4a9b089

Please sign in to comment.