Creating JSON Schemas
You can create JSON schemas using the following procedure or alternatively you can create a JSON schema by deriving it from a JSON string sample (often made available by the documentation for the REST service). See Creating JSON schema from a JSON sample.
A JSON schema declares the types and properties of the complex types used for request / response payload data when invoking REST service methods.
- Procedure
- Right-click a REST Services project in Project Explorer and select .
- On the Create a new JSON Schema file dialog box, click Finish.
- Add Properties to the JSON object.
- Create and use child types for properties of a complex type.
- On the General tab on the Properties view for a JSON Object Type, edit the property types (which are 'Text' by default). Alternatively you can drag-drop types onto properties in the main editor. You can also move properties around using drag drop or the controls provided.
For services that require or return arrays, check Array.Note: You can also create schemas by importing IETF JSON Schema files (as defined at http://json-schema.org/).