1

I have spent a few hours reading about JSON online and have read a JSON for beginners text book. However, I still can not find out how to start using JSON to store data. Is there a JSON download or interface that is used or do you store JSON files in other languages like python?

I understand JSON is a file format, but where do I write and store JSON files?

My question is different than the suggested duplicate because it is more narrow. My question specifically asks "where do I write a JSON file?", as opposed to "how do I use JSON?"

DISCLAIMER I'm brand new to coding and don't have a teacher to consult to ask questions. I am asking this question because I am genuinely trying to learn and this information is not available online, nor in the textbook that I purchased.

Thank you in advance for your help!

Brian Haney
  • 57
  • 1
  • 8
  • Possible duplicate of [What is JSON and why would I use it?](https://stackoverflow.com/questions/383692/what-is-json-and-why-would-i-use-it) or [Export json to json file](https://stackoverflow.com/questions/46023112/export-json-to-json-file) – GalAbra Mar 03 '18 at 17:30
  • JSON is a file format, so you just open and read or write a regular file. Most of languages have own libraries. check on JSON website. For python, you have e.g. https://docs.python.org/3/library/json.html Check the examples. – Giacomo Catenazzi Mar 03 '18 at 17:31
  • @GalAbra thanks for the response! My question is different than the suggested duplicate because it is more narrow. My question specifically asks "where do I write a JSON file?", as opposed to "how do I use JSON?" However, my question was answered below! – Brian Haney Mar 03 '18 at 17:47

1 Answers1

2

JSON is a file format for storing and passing data between, you can create a JSON file in any text editor, it should follow the JSON format that's it , you can validate the format of your JSON using online validators, I usually use https://jsonlint.com/, JSON is a standard which is supported by almost every programming language, you have API in every language to support it.

you can find examples of JSON data here http://json.org/example.html

just copy them and store them in a file with extension ".json", you can read them from your program by specifying the path where the file is present on the file system.

arjunsv3691
  • 791
  • 6
  • 19