json schema define code example
Example: json schema
JSchema schema = JSchema.Parse(@"{
'type': 'array',
'item': {'type':'string'}
}");
JsonTextReader reader = new JsonTextReader(new StringReader(@"[
'Developer',
'Administrator'
]"));
JSchemaValidatingReader validatingReader = new JSchemaValidatingReader(reader);
validatingReader.Schema = schema;
JsonSerializer serializer = new JsonSerializer();
List roles = serializer.Deserialize>(validatingReader);