提交 81e02180 编写于 作者: C Collin Jackson

Fix type of nested data structures on Android

上级 30cc1574
......@@ -189,13 +189,9 @@ public class FirebaseImpl implements org.chromium.mojom.firebase.Firebase {
DataSnapshot toMojoSnapshot(com.firebase.client.DataSnapshot snapshot) {
DataSnapshot mojoSnapshot = new DataSnapshot();
mojoSnapshot.key = snapshot.getKey();
try {
JSONObject jsonObject = new JSONObject();
jsonObject.put("value", snapshot.getValue());
mojoSnapshot.jsonValue = jsonObject.toString();
} catch (JSONException e) {
Log.e(TAG, "toMojoSnapshot JSONException", e);
}
Map<String, Object> jsonValue = new HashMap<String, Object>();
jsonValue.put("value", snapshot.getValue());
mojoSnapshot.jsonValue = new JSONObject(jsonValue).toString();
return mojoSnapshot;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册