JSON

JSON

Test your JSON knowledge with free quizzes on MyCodeSkills covering core concepts.


  1. What does JSON stand for?

    • Java Source Open Notation
    • JavaScript Object Notation
    • Java Standard Output Network
    • JavaScript Output Notation
  2. What is the correct syntax for a JSON key?

    • key: "value"
    • key': "value"
    • "key": "value"
    • key = "value"
  3. Which data type is NOT supported in JSON?

    • String
    • Date
    • Number
    • Boolean
  4. Which of the following is a valid JSON object?

    • {name: "John", age: 30}
    • {"name": "John", "age": 30}
    • {‘name’: ‘John’, ‘age’: 30}
    • {name = "John", age = 30}
  5. JSON keys must be?

    • Strings
    • Numbers
    • Booleans
    • Arrays
  6. Which method in JavaScript converts a JSON string into an object?

    • JSON.toObject()
    • JSON.decode()
    • JSON.parse()
    • JSON.convert()
  7. What does JSON.stringify() do in JavaScript?

    • Parses a JSON string
    • Converts an object to a JSON string
    • Minifies a JSON string
    • Extracts keys from a JSON object
  8. In Python, which module is used to work with JSON?

    • json
    • serialize
    • python_json
    • jsonlib
  9. Which function in Python converts a dictionary to a JSON string?

    • json.to_json()
    • json.convert()
    • json.dumps()
    • json.stringify()
  10. Which function in Python parses a JSON string to a dictionary?

    • json.loads()
    • json.parse()
    • json.input()
    • json.to_dict()
  11. What is the purpose of a JSON Schema?

    • To render JSON in the browser
    • To encrypt JSON data
    • To define and validate the structure of JSON data
    • To compress JSON payload
  12. Which of the following best describes a JSON Schema data type?

    • It defines syntax rules for JavaScript
    • It specifies format, required fields, and types
    • It generates automatic frontend code
    • It replaces XML
  13. What is $ref used for in JSON Schema?

    • Referencing REST endpoints
    • Linking to external stylesheets
    • Referencing definitions inside or outside the schema
    • Setting default values
  14. Which JSON Patch operation replaces a value?

    • add
    • update
    • patch
    • replace
  15. In JSON Patch, what does the remove operation do?

    • Deletes the key but keeps the value
    • Marks the field as null
    • Removes the key and value from the object
    • Hides the field