1

I'm experimenting with Google's new Firebase database service; and I was just wondering if it would be possible to push an entire JSON(Object?) to my database.

Thanks, Josh

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807
Joshua Feltimo
  • 323
  • 1
  • 3
  • 12
  • In what format do you have the JSON object? – Frank van Puffelen Jul 08 '16 at 15:32
  • I don't actually have one yet, I'm just wondering if that would be the best way to go about it or if it would be possible to upload a raw .json file or something – Joshua Feltimo Jul 08 '16 at 17:23
  • If I have a JSON file, I usually upload it through the Firebase CLI `firebase database:set`. See https://firebase.google.com/docs/cli/#database_commands. It can also be done through code, but I find the CLI easier for the cases I need it. – Frank van Puffelen Jul 08 '16 at 18:06
  • You can refer this example https://androidheight.blogspot.in/2017/04/firebase-reatime-database.html – Prabhakar Apr 17 '17 at 04:33

1 Answers1

0

I parsed my JSONObject to a map using this and then saved to firebase using setValue().

Community
  • 1
  • 1
josue.0
  • 775
  • 1
  • 10
  • 23