Merge pull request #1516 from realm/fix-json-parsing

fix json parsing
This commit is contained in:
blagoev 2017-11-21 09:05:42 +02:00 committed by GitHub
commit 1077030625
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -4,9 +4,10 @@
* None.
### Enchancements
* None
* Reenable Realm for RN Android (#1506)
### Bug fixes
* Fix json parsing in RN debugger.
* Reenable Realm for RN Android (#1506), which was disabled only in 2.0.8 by mistake.
### Internal

View File

@ -600,13 +600,13 @@ json RPCServer::serialize_json_value(JSValueRef js_value) {
}
JSValueRef RPCServer::deserialize_json_value(const json dict) {
json oid = dict["id"];
json oid = dict.value("id", json());
if (oid.is_number()) {
return m_objects[oid.get<RPCObjectID>()];
}
json value = dict["value"];
json type = dict["type"];
json value = dict.value("value", json());
json type = dict.value("type", json());
if (type.is_string()) {
std::string type_string = type.get<std::string>();