Schema property order

The standard JSON schema does not support specifying an order to the properties that are defined in a schema.

If the fields in your JSON or DSV data objects must be displayed in a specific order, you can use the x-position custom property to define that order. The value for x-position must be an integer.

This is an example of a schema:

{  
   "$schema":"http://json-schema.org/draft-06/schema#",
   "title":"Schema Property Order",
   "description":"Sample schema to include property order",
   "type":"object",
   "properties":{  
   	   "divisionName":{  
            "type":"string",
            "maxLength":16,
	       "x-position":2
         },
         "divisionId":{  
            "type":"string",
            "maxLength":250,
	       "x-position":1
         },
         "updateDateTime":{  
            "type":"string",
            "format":"date-time"
         },
         "variationNumber":{
            "type":"integer"
         },
         "companyId":{  
            "type":"string",
            "x-position":3
         }
         
   }

Because x-position is optional, including it for all properties in a schema is not required. Applications that use this metadata determine how to handle the view of fields that do not contain the x-position value.