From 81e0218018bc182341cd2ca4295390bf379d5e8d Mon Sep 17 00:00:00 2001 From: Collin Jackson Date: Fri, 22 Jan 2016 12:25:27 -0800 Subject: [PATCH] Fix type of nested data structures on Android --- .../src/org/domokit/firebase/FirebaseImpl.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sky/services/firebase/src/org/domokit/firebase/FirebaseImpl.java b/sky/services/firebase/src/org/domokit/firebase/FirebaseImpl.java index ea795c22bbd..6ae9c343ec4 100644 --- a/sky/services/firebase/src/org/domokit/firebase/FirebaseImpl.java +++ b/sky/services/firebase/src/org/domokit/firebase/FirebaseImpl.java @@ -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 jsonValue = new HashMap(); + jsonValue.put("value", snapshot.getValue()); + mojoSnapshot.jsonValue = new JSONObject(jsonValue).toString(); return mojoSnapshot; }