mirror of
https://github.com/flutter/flutter.git
synced 2026-02-20 02:29:02 +08:00
Merge pull request #2285 from collinjackson/nested
Fix type of nested data structures on Android
This commit is contained in:
commit
2bb3d6d265
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user