What is JSON Schema

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 พ.ย. 2024

ความคิดเห็น • 120

  • @kal1nas
    @kal1nas 2 ปีที่แล้ว +51

    You speak clearly, you don’t rush, you record in 1080p60fps, you give examples, you draw graphs - THANK YOU. I will support your channel!

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว +1

      Thanks a lot

    • @emmanuelmotsi
      @emmanuelmotsi 2 ปีที่แล้ว

      definitely agree. Thank you, great explanation!

  • @cutiepiec2829
    @cutiepiec2829 4 ปีที่แล้ว +4

    I encountered json schema during one of the test.. now I clearly understood.. Thank you 😊😊😊

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      Glad it helped!

  • @venkatanarasimha8489
    @venkatanarasimha8489 11 หลายเดือนก่อน +1

    good

    • @RaghavPal
      @RaghavPal  11 หลายเดือนก่อน

      Thanks Venkata

  • @redyeti7371
    @redyeti7371 10 หลายเดือนก่อน

    This was AMAZING. Exceptional teaching skill, I got the concept perfectly, thank you!!

    • @RaghavPal
      @RaghavPal  10 หลายเดือนก่อน

      Most welcome Chad

  • @miezepups15
    @miezepups15 2 หลายเดือนก่อน

    The way you structured that json file O.O I'm going to do it that way too; so clear and organised!

    • @RaghavPal
      @RaghavPal  2 หลายเดือนก่อน

      Glad it helped

  • @nikhil978k
    @nikhil978k ปีที่แล้ว

    Sir your really a god gifted teacher.

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Thanks for the kind words Nikhil

  • @benheideveld4617
    @benheideveld4617 3 ปีที่แล้ว +4

    You are: a great teacher!

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Humbled to see your message Ben, I am learning & improving daily

  • @BardoSchutz
    @BardoSchutz 2 หลายเดือนก่อน

    many thanks for good explanation!

    • @RaghavPal
      @RaghavPal  2 หลายเดือนก่อน

      You are welcome

  • @pankajnirabh5909
    @pankajnirabh5909 3 ปีที่แล้ว +1

    clear explanation, thanks Raghav

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      You're most welcome Pankaj

  • @roushansingh8895
    @roushansingh8895 2 ปีที่แล้ว

    Focusing on word a great Idea. Keep it up 🙏🙏

  • @saranyajothi9691
    @saranyajothi9691 2 ปีที่แล้ว

    No words to say... really really good

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Thanks a lot Saranya

  • @BG-fo4si
    @BG-fo4si 2 ปีที่แล้ว

    Great job

  • @nghiavoai7993
    @nghiavoai7993 3 ปีที่แล้ว +2

    Very useful course. Thank you for sharing!

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว +1

      Most welcome Nghĩa

  • @sagarbhave5483
    @sagarbhave5483 4 ปีที่แล้ว +1

    Thank you Raghav for Raghav for the wonderful explanation
    I have one question what is application of xml in embedded systems

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +1

      XML is basically for data & information exchange and can be used to transfer data between 2 systems or apps

  • @tanmayshukla6444
    @tanmayshukla6444 3 ปีที่แล้ว +2

    You're good at this! Keep it up. Subtle and crisp.

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      I appreciate that Tanmay

  • @bindunagaraj123
    @bindunagaraj123 3 ปีที่แล้ว

    wow, such a simple explanation.

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Glad it was helpful Bindu

  • @markthomas9641
    @markthomas9641 2 ปีที่แล้ว +1

    Great video, thank you. DeltaJSON is really useful if you are working with JSON, it does compare, merge and graft.

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Great to hear!

  • @svalyavasvalyava9867
    @svalyavasvalyava9867 2 ปีที่แล้ว

    thank you, amazing explanation!!!

  • @nidhi26100
    @nidhi26100 4 ปีที่แล้ว +1

    Thankyou for this video!!

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      You're so welcome Nidhi

  • @OlgaWitcher
    @OlgaWitcher 3 ปีที่แล้ว

    helped a lot in my work 🙏thank you very much ♥

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว +1

      Most welcome

  • @isra2163
    @isra2163 ปีที่แล้ว

    Thank u for your explain✨

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      You’re welcome 😊

  • @RushalPatil825
    @RushalPatil825 3 ปีที่แล้ว

    Well explained. Thanks for the video

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Glad it was helpful Rushal

  • @nitinkumarchauhan688
    @nitinkumarchauhan688 3 ปีที่แล้ว

    So simple and amazing thanks for sharing

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Most welcome

  • @gauravdalvi9288
    @gauravdalvi9288 3 ปีที่แล้ว

    Great job it's really helpful

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Glad it helped

  • @roymoran1151
    @roymoran1151 3 ปีที่แล้ว

    very nice. very nice.

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Thanks a lot Roy

  • @ShaileshKumar-sm1ns
    @ShaileshKumar-sm1ns 4 ปีที่แล้ว

    nice one

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Thanks for watching Shailesh

  • @lkarthik1985
    @lkarthik1985 4 ปีที่แล้ว +1

    As usual excellent content. Thanks 🙏

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Glad you enjoyed it

  • @vishaltripathi8608
    @vishaltripathi8608 3 ปีที่แล้ว

    making video for json parsing library . very effective video for automation testing

  • @mahadev1050
    @mahadev1050 4 ปีที่แล้ว

    Awesome👏👏👏👏

  • @Arwen6arwen
    @Arwen6arwen 3 ปีที่แล้ว

    It was extremely useful! Thank you!

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Glad it was helpful Arwen

  • @amitchauhan1505
    @amitchauhan1505 3 ปีที่แล้ว +2

    How to create schema for json where Array members are unknown, like users array size can b2 2 or 4 or 6 some day. I see in this example that schema is only created as per given JSON.

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Hi Amit, you can use wild characters and dynamic properties, Check stackoverflow.com/questions/28697209/json-schema-for-dynamic-properties

  • @VishalSharma-rn7mt
    @VishalSharma-rn7mt 4 ปีที่แล้ว

    great video

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Thanks Vishal

  • @subhamthemusicalguy8851
    @subhamthemusicalguy8851 2 ปีที่แล้ว

    Thanks a lot

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Most welcome Subham

  • @aljon7992
    @aljon7992 4 ปีที่แล้ว

    Thanks teacher

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      You are welcome

  • @abhijeets6593
    @abhijeets6593 4 ปีที่แล้ว +2

    Love it !!

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว

      Thanks for watching Abhijeet

  • @CMParks10
    @CMParks10 2 หลายเดือนก่อน

    Thank you for the video. At 01:31 how does validation actually happen? This part has always been confusing. Where does the actual validation happen at? It makes it sound like when a request goes to a given API endpoint, the JSON in the request is validated against the schema before it does anything, is that correct? If so, is there a code example? Sorry for the loaded comment.

    • @RaghavPal
      @RaghavPal  2 หลายเดือนก่อน

      Corey
      I believe if you go through this and next videos of the series you should get the details. Can check more on such lectures here - automationstepbystep.com/

  • @kirubababu9255
    @kirubababu9255 ปีที่แล้ว +1

    How to create ourself json to json schema in python and validate with json response?
    Do we have any code?

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Hi Kiruba,
      Yes, you can create a JSON schema and validate JSON responses in Python using the jsonschema library.
      Can check here - pynative.com/python-json-validation/

    • @kirubababu9255
      @kirubababu9255 ปีที่แล้ว

      @@RaghavPal
      Thanks for your soln!!
      Is there any way to convert json response to json schema?

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      To convert a JSON response to a JSON Schema in Python, you can use the jsonschema library. Here is an example of how to do it:
      import jsonschema
      # Your JSON response
      response = {
      "name": "John Doe",
      "age": 30,
      "email": "johndoe@example.com"
      }
      # Generate the JSON Schema
      schema = jsonschema.Draft7Validator.check_schema(response)
      # Print the schema
      print(schema)

    • @kirubababu9255
      @kirubababu9255 ปีที่แล้ว

      @@RaghavPal
      Thanks!!
      The same code which I got from ChatGPT, but it's not working as expected

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      will need to try with some online examples

  • @Rajivrocks-Ltd.
    @Rajivrocks-Ltd. 3 ปีที่แล้ว

    Can you use a JSON Schema to filter out unwanted data? So you have a huge JSON file you get from an endpoint but you just want 2 or 3 fields from it?

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      That is better done using JSON Path

    • @Rajivrocks-Ltd.
      @Rajivrocks-Ltd. 3 ปีที่แล้ว

      @@RaghavPal ah okay thank you ill look into that!

  • @siddheshborse5416
    @siddheshborse5416 2 ปีที่แล้ว

    What is the hotspot field in the post schema??

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Not sure on this Siddhesh

  • @nazeermohammed3085
    @nazeermohammed3085 3 ปีที่แล้ว

    Hi Raghav, Thanks How to achieve the same via automation using Java ?

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว +1

      I will plan a session Nazeer

  • @bpnpkate56
    @bpnpkate56 2 ปีที่แล้ว

    I am new to JSON and in a schema file provided they have a mapping section with Definitions. Do you have any additional information or training on this part of JSON.

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว +1

      Hi, not more that this as of now

  • @azkyakhan
    @azkyakhan 4 ปีที่แล้ว

    Thanx

  • @lrpbro6945
    @lrpbro6945 11 หลายเดือนก่อน

    Hii sir , I have one JSON DATA file with datas in it. Now I want to EDIT or modify the DATAS OF VALUES from that json file , but I can't able to do that for JSON ARRAY, please give me some example to refer for that

    • @RaghavPal
      @RaghavPal  11 หลายเดือนก่อน

      ## Modifying data in a JSON file with an array
      There are various ways to modify data in a JSON file with an array, depending on your specific needs and programming language. Here are some examples:
      **1. Python:**
      ```python
      import json
      with open("data.json", "r") as f:
      data = json.load(f)
      # Accessing specific element in array
      data["array_name"][0]["key"] = "new_value"
      # Looping and modifying elements
      for item in data["array_name"]:
      if item["condition"]:
      item["key"] = "modified_value"
      # Updating the JSON file
      with open("data.json", "w") as f:
      json.dump(data, f, indent=4)
      ```
      **2. JavaScript:**
      ```javascript
      const fs = require('fs');
      const data = JSON.parse(fs.readFileSync('data.json', 'utf8'));
      // Accessing specific element in array
      data.arrayName[0].key = 'newValue';
      // Looping and modifying elements
      data.arrayName.forEach(item => {
      if (item.condition) {
      item.key = 'modifiedValue';
      }
      });
      // Updating the JSON file
      fs.writeFileSync('data.json', JSON.stringify(data, null, 2));
      ```
      **3. Shell Script:**
      ```sh
      jq '.array_name[0].key = "new_value"' data.json > data_new.json
      ```
      **4. JSON Online Tools:**
      Several online tools allow you to edit JSON data directly in your browser. You can search for "JSON editor" or "JSON online tool" to find one that suits your needs.
      **Additional Tips:**
      * Make sure you have the correct file path and access permissions.
      * Always back up your original JSON file before making any changes.
      * Use descriptive variable names and comments to improve code readability.
      * Consider using libraries or modules specifically designed for JSON manipulation for more complex tasks.
      These examples provide a basic framework for modifying data in a JSON file with an array. Remember to adapt the code to your specific data structure and desired modifications.

  • @movimovimania5521
    @movimovimania5521 2 ปีที่แล้ว

    Like you can create XML API samples from XML Schema can we create JSON API requests from JSON Schema?

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Hi Movi, we can use JSON schema to annotate and validate json documents

    • @movimovimania5521
      @movimovimania5521 2 ปีที่แล้ว

      @@RaghavPal Thanks what i meant is rolling out JSON API requests using JSON Schema, not just for validation / annotation

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      Not exactly, its for checking the format, structure. Basically it checks if your Json message conforms with the schema

    • @movimovimania5521
      @movimovimania5521 2 ปีที่แล้ว

      @@RaghavPal right, so basically it's not similar to XML Schema where an XML schema is capable of populating an XML API request but JSON schema simply validates, but isn't capable of populating a sample JSON request ... that feels a bit odd considering JSON is so popular.

    • @RaghavPal
      @RaghavPal  2 ปีที่แล้ว

      See you can generate a sample document, but will need to add the values and data
      www.liquid-technologies.com/online-schema-to-json-converter
      stackoverflow.com/questions/21894873/generate-sample-json-output-from-json-schema

  • @emrentoelluminiados
    @emrentoelluminiados 5 หลายเดือนก่อน

    how can i find type and properties list?

    • @RaghavPal
      @RaghavPal  5 หลายเดือนก่อน +1

      Emre
      Based on what i infer from your query..
      In JSON Schema, you can define the type of a schema and specify its properties. Let's break it down:
      1. Data Types:
      - JSON Schema defines several basic data types:
      - String: Represents text values.
      - Number: Includes both integers and floating-point numbers.
      - Object: Represents structured data with key-value pairs.
      - Array: Contains an ordered list of values.
      - Boolean: Represents true or false.
      - Null: Represents the absence of a value.
      2. Example Schema:
      Here's a simple example of a JSON Schema that defines an object with a single property:
      ```json
      {
      "$schema": "json-schema.org/draft-04/schema",
      "title": "Product",
      "description": "A product from Acme's catalog",
      "type": "object",
      "properties": {
      "id": {
      "description": "The unique identifier for a product",
      "type": "integer"
      }
      },
      "required": ["id"]
      }
      ```
      In this schema:
      - The type is set to "object."
      - The "id" property is of type "integer."
      3. Property Constraints:
      - You can add constraints to properties using keywords like `minimum`, `maximum`, `pattern`, and more.
      - For example, you can specify a numeric range for a property or require certain properties to be present.
      Remember to adapt these concepts to your specific use case
      --

    • @emrentoelluminiados
      @emrentoelluminiados 5 หลายเดือนก่อน

      @@RaghavPal Thank you, it was very descriptive.

  • @t.hemanthkumar7369
    @t.hemanthkumar7369 ปีที่แล้ว

    Hi sir how to convert one json schema to another different json schema in python code

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Hemanth
      To convert one JSON schema to another different JSON schema in Python code, you can use the following steps:
      1. **Import the necessary libraries.**
      ```python
      import json
      import jsonschema
      ```
      2. **Load the source JSON schema.**
      ```python
      with open("source_schema.json", "r") as f:
      source_schema = json.load(f)
      ```
      3. **Validate the source JSON schema.**
      ```python
      jsonschema.validate(source_schema, jsonschema.Schema())
      ```
      4. **Convert the source JSON schema to the new JSON schema.**
      ```python
      new_schema = jsonschema.Draft7Validator(source_schema).schema
      ```
      5. **Save the new JSON schema.**
      ```python
      with open("new_schema.json", "w") as f:
      json.dump(new_schema, f, indent=4)
      ```
      Here is an example of a Python code that converts a JSON schema from Draft 4 to Draft 7:
      ```python
      import json
      import jsonschema
      # Load the source JSON schema.
      with open("source_schema.json", "r") as f:
      source_schema = json.load(f)
      # Validate the source JSON schema.
      jsonschema.validate(source_schema, jsonschema.Schema())
      # Convert the source JSON schema to the new JSON schema.
      new_schema = jsonschema.Draft7Validator(source_schema).schema
      # Save the new JSON schema.
      with open("new_schema.json", "w") as f:
      json.dump(new_schema, f, indent=4)
      ```
      You can use the same approach to convert JSON schemas from any draft to another draft.

  • @prabhumishra3323
    @prabhumishra3323 4 ปีที่แล้ว

    Hi sir, since I did not get any contact information about you, so I am requesting in the comment.please create a series for chatbot test automation. Currently I might be working in a chatbot project where need to do functional and automation testing. Waiting for your reply.

    • @RaghavPal
      @RaghavPal  4 ปีที่แล้ว +3

      Sure I will plan on this Prabhu

    • @prabhumishra3323
      @prabhumishra3323 4 ปีที่แล้ว

      @@RaghavPal Thank you so much sir. I really need this tutorial.

  • @J-a-c-k-k-k
    @J-a-c-k-k-k หลายเดือนก่อน

    hell yeah 🤘🤘

    • @RaghavPal
      @RaghavPal  หลายเดือนก่อน

      Thanks for watching .. keep learning

  • @greenmountain8986
    @greenmountain8986 3 ปีที่แล้ว

    how would you validate in c#

    • @RaghavPal
      @RaghavPal  3 ปีที่แล้ว

      Hi, will try to create a session on that

  • @t.hemanthkumar7369
    @t.hemanthkumar7369 ปีที่แล้ว

    Please send me python code for me

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      To convert one JSON schema to another different JSON schema in Python code, you can use the following steps:
      1. **Import the necessary libraries.**
      ```python
      import json
      import jsonschema
      ```
      2. **Load the source JSON schema.**
      ```python
      with open("source_schema.json", "r") as f:
      source_schema = json.load(f)
      ```
      3. **Validate the source JSON schema.**
      ```python
      jsonschema.validate(source_schema, jsonschema.Schema())
      ```
      4. **Convert the source JSON schema to the new JSON schema.**
      ```python
      new_schema = jsonschema.Draft7Validator(source_schema).schema
      ```
      5. **Save the new JSON schema.**
      ```python
      with open("new_schema.json", "w") as f:
      json.dump(new_schema, f, indent=4)
      ```
      Here is an example of a Python code that converts a JSON schema from Draft 4 to Draft 7:
      ```python
      import json
      import jsonschema
      # Load the source JSON schema.
      with open("source_schema.json", "r") as f:
      source_schema = json.load(f)
      # Validate the source JSON schema.
      jsonschema.validate(source_schema, jsonschema.Schema())
      # Convert the source JSON schema to the new JSON schema.
      new_schema = jsonschema.Draft7Validator(source_schema).schema
      # Save the new JSON schema.
      with open("new_schema.json", "w") as f:
      json.dump(new_schema, f, indent=4)
      ```
      You can use the same approach to convert JSON schemas from any draft to another draft.

  • @Pareshbpatel
    @Pareshbpatel ปีที่แล้ว

    Nice introduction to JSON Schema. Thanks
    {2023-06-07}, {2023-12-11}

    • @RaghavPal
      @RaghavPal  ปีที่แล้ว

      Most welcome Paresh