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:
Treehugger Robot 2021-03-02 03:07:31 +00:00 committed by Automerger Merge Worker
commit e198860c27

View file

@ -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;
}