In simulation, deserializing a StatusReply now does a strict JSON parse.

This commit is contained in:
Stephen Atherton 2018-09-10 11:13:41 -07:00
parent ce38ddbd4b
commit 6a04fa0ede
1 changed files with 8 additions and 2 deletions

View File

@ -199,8 +199,14 @@ struct StatusReply {
ar & statusStr; ar & statusStr;
if( ar.isDeserializing ) { if( ar.isDeserializing ) {
json_spirit::mValue mv; json_spirit::mValue mv;
json_spirit::read_string( statusStr, mv ); if(g_network->isSimulated()) {
statusObj = StatusObject(mv.get_obj()); mv = readJSONStrictly(statusStr);
}
else {
// In non-simulation allow errors because some status data is better than no status data
json_spirit::read_string( statusStr, mv );
}
statusObj = std::move(mv.get_obj());
} }
} }
}; };