diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/JsonFakeValueGenerator.cpp b/automotive/vehicle/2.0/default/impl/vhal_v2_0/JsonFakeValueGenerator.cpp index 890eb33643..b62918f61e 100644 --- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/JsonFakeValueGenerator.cpp +++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/JsonFakeValueGenerator.cpp @@ -96,11 +96,12 @@ bool JsonFakeValueGenerator::hasNext() { std::vector JsonFakeValueGenerator::parseFakeValueJson(std::istream& is) { std::vector 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; }