Nakiri's JSON Sandbox

Free JSON datas to test your fetch or anything you call about getting a data from a json

Introduction to JSON parsing

Hello! This is Nakiri Json db this website have json files that you can use to practice your API that you will use for your projects

This is an example code that you can use to fetch a JSON body

              
                (async () =>{
                  fetch("https://sandbox.nakiri.space/data/people.json")
                  .then(response => response.json())
                  .then(data => {
                      data.forEach(user => {
                          console.log("Name :" + user.name)
                          console.log("Age :" + user.age)
                      })
                  })    
                  .catch(error => {
                      console.error("Error fetching data:", error);
                  });
                })();
              
            

and this is an example output

              Name :John Doe
              Age :28
              Name :Jane Smith
              Age :34
              Name :Alice Johnson
              Age :22
              Name :Bob Brown
              Age :45
              Name :Charlie Davis
              Age :30
              .....
            

Here is the different types of JSON structure you can use to practice parsing JSON

People JSON Structure - Level: Medium

Top-Level Keys

  • id
  • name
  • age
  • address
  • email
  • quote
  • details (nested objects)

Keys inside details

  • hobbies (array)
  • education (nested object)

Keys inside education

  • degree
  • major

This section shows you the look of a JSON Structure inside a file



            {
              "id": "1a2b3c",
              "name": "John Doe",
              "age": 28,
              "address": "123 Main St, Springfield, IL",
              "email": "johndoe@example.com",
              "quote": "The only limit is your imagination.",
              "details": {
                "hobbies": ["reading", "hiking", "coding"],
                "education": {
                  "degree": "Bachelor of Science",
                  "major": "Computer Science"
                }
              }
            }
          

Q: Why JSON and NOT a database is used for this?

JSON is used instead of a database because it serves as a great starting point for understanding data storage and retrieval. Since many programming languages communicate by parsing JSON data, practicing with JSON helps build a foundation for working with databases later. When retrieving or inserting data into a database, it's often converted to JSON format for easier handling. For simple web projects, using JSON files is a practical way to store and query data, as it is readable and widely supported by different programming languages.