Importing JSON file in Firebase

10.5k views Asked by At

I imported a JSON file into Firebase Realtime db, but cannot see the db schema change as per my JSON. Where will my JSON file data be seen in the Firebase db?

2

There are 2 answers

1
sunil Kumawat On

I think you know very well that how to import or export database json. Now if your database JSON file is correct then it import your json file in the firebase database and automatically create the schema of the database according to the json file... Otherwise it show you error

check your json file and try again

0
Stephane Paquet On

Here is the comment I'm using to import JSON files to a database:

firebase database:set /location/ file.json -P project-id

You can replace set by push and update depending on what you are trying to achieve (read Firebase CLI references for more options)

Your data will then be uploaded to the "location" you mentioned in the above command.

Note: pay attention to your JSON file as it can contain the location too what will result in having your data uploaded at the wrong location...