Skip to content

Commit

Permalink
Fix type of nested data structures on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
collinjackson committed Jan 22, 2016
1 parent 30cc157 commit 81e0218
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions sky/services/firebase/src/org/domokit/firebase/FirebaseImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -189,13 +189,9 @@ public void onComplete(FirebaseError error, com.firebase.client.Firebase ref) {
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;
}

Expand Down

0 comments on commit 81e0218

Please sign in to comment.