diff options
author | Jeff Hatch <jhatch@multitech.com> | 2021-03-08 08:25:55 -0600 |
---|---|---|
committer | Jeff Hatch <jhatch@multitech.com> | 2021-03-08 08:25:55 -0600 |
commit | ad6b4d51ac469d4e7300fd74d1ada87b1caece93 (patch) | |
tree | 73fdf3f6ab42e58cc2f2bd1ba604564f8e0c78f5 | |
parent | 89f84b81da3b94e9b099debbe63b87b85e5697b6 (diff) | |
parent | 08fb28a8ed9dddc90af27e60d58e21ba6f282425 (diff) | |
download | libmts-io-ad6b4d51ac469d4e7300fd74d1ada87b1caece93.tar.gz libmts-io-ad6b4d51ac469d4e7300fd74d1ada87b1caece93.tar.bz2 libmts-io-ad6b4d51ac469d4e7300fd74d1ada87b1caece93.zip |
Merge branch 'jsoncpp_update' into 'master'
1.0.23
Allow building against jsoncpp 1.9.2
See merge request !35
-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 |