AnsweredAssumed Answered

JSON Schema validation?

Question asked by Sathish2306 on Jun 15, 2015
Latest reply on Jun 18, 2015 by Doyle_Reece

So, i know we can validate json using json schema validation,

 

What are all the types layer 7 supports, from the documentation, i found the below data types,

 

1. object,

2. string

3. boolean.

 

What are the extra types layer 7 supports for schema validation E.g (Array,Decimal)?

 

From the below image, i found that i can validate a JSON.

 

Should the schema for validation should be exactly same like this?

jsonschema.PNG

 

 

For Example:

 

{

  "a":"howareyou",

  "b":[

       {

          "1":"One",

          "2": "Two"

       }

   ],

  "c": 500.00

}

 

How to validate the above schema? (The Key "b" can contain many arrays).

 

P.S Some of the Key and value , may or may not come?

 

Ex: Above input can be also,

 

{

  "a":"howareyou",

  "b":[

       {

          "1":"One",

          "2": "Two"

       }

   ]

}

Outcomes