diff options
Diffstat (limited to 'src/MTS_IO_ME910C1WWRadio.cpp')
-rw-r--r-- | src/MTS_IO_ME910C1WWRadio.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/MTS_IO_ME910C1WWRadio.cpp b/src/MTS_IO_ME910C1WWRadio.cpp index 32c64b3..80c2320 100644 --- a/src/MTS_IO_ME910C1WWRadio.cpp +++ b/src/MTS_IO_ME910C1WWRadio.cpp @@ -173,12 +173,21 @@ ICellularRadio::CODE ME910C1WWRadio::doFumoReadConfig(const Json::Value& jArgs, file.read(&buffer[0], size); file.close(); +#if defined(JSONCPP_VERSION_HEXA) && (JSONCPP_VERSION_HEXA > 0x010600) // > 1.6.0 + Json::CharReaderBuilder builder; + std::istringstream ss(buffer); + if (!Json::parseFromStream(builder, ss, &jConfig, NULL)) { + printError("Error parsing FOTA configuration file"); + break; + } +#else Json::Features features = Json::Features::strictMode(); Json::Reader reader(features); if (!reader.parse(buffer, jConfig)) { printError("Error parsing FOTA configuration file"); break; } +#endif // // set default values if missing |