dalenguyen / firestore-import-export

An application that can help you to backup and restore from Cloud Firestore | Firebase
https://www.npmjs.com/package/firestore-export-import
401 stars 109 forks source link

Exported Json File on One Line #17

Closed Harin329 closed 5 years ago

Harin329 commented 5 years ago

I have two test documents in a collection right now and all the information is exported, but it's all in one line. Is there anything I need to add to get it to format nicely like the example json file without having to manually do it by entering.

dalenguyen commented 5 years ago

Hi @Harin329, can you take a snapshot of your results? Thanks,

Harin329 commented 5 years ago

This is the sample code. It's all under one line, I could use an online formatter, but was wondering if there was any even simpler code additions to get it looking nice!

{"Canada":{"Motomachi Shokudo":{"Menu":{"Appetizers":{"Chicken Chashu Rice":{"Raters":1,"Price":6,"Rating":2.5}}},"Rating":2.5,"Website":"www.google.com","Location":{"_latitude":49.290683,"_longitude":-123.133956},"Phone":"(604) 999-9999","NumRates":1,"Country":"Canada","City":"Vancouver"}}}

dalenguyen commented 5 years ago

Hi @Harin329. for this, you can quickly use an IDE plugin to format the JSON file.

This is an example if you use VSCode: https://stackoverflow.com/questions/29973357/how-do-you-format-code-in-visual-studio-code-vscode