Merge "[automotive] Use new jsoncpp API" am: 3d22587ce7
am: aff567a81f
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1608216 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I9b1a532ed68fcfd3b4570abbf9cd7b1bf329ff8d
This commit is contained in:
commit
e198860c27
1 changed files with 4 additions and 3 deletions
|
@ -96,11 +96,12 @@ bool JsonFakeValueGenerator::hasNext() {
|
|||
std::vector<VehiclePropValue> JsonFakeValueGenerator::parseFakeValueJson(std::istream& is) {
|
||||
std::vector<VehiclePropValue> fakeVhalEvents;
|
||||
|
||||
Json::Reader reader;
|
||||
Json::CharReaderBuilder builder;
|
||||
Json::Value rawEvents;
|
||||
if (!reader.parse(is, rawEvents)) {
|
||||
std::string errorMessage;
|
||||
if (!Json::parseFromStream(builder, is, &rawEvents, &errorMessage)) {
|
||||
ALOGE("%s: Failed to parse fake data JSON file. Error: %s", __func__,
|
||||
reader.getFormattedErrorMessages().c_str());
|
||||
errorMessage.c_str());
|
||||
return fakeVhalEvents;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue