mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 11:36:00 +00:00
Merge "[automotive] Use new jsoncpp API" am: 3d22587ce7
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1608216 MUST ONLY BE SUBMITTED BY AUTOMERGER Change-Id: I394fb59c7622b8df164b74b713d568f0fb2c3be6
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user