[automotive] Use new jsoncpp API
Reader / StyledWriter are deprecated upstream Bug: 170642246 Change-Id: I9d2a764261e2124a4e99e065446b4946305a914d
This commit is contained in:
parent
0b12cea833
commit
0684d40451
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