Parse JSON Schema from JSON |
This sample parses a JSchema from JSON
string schemaJson = @"{ 'description': 'A person', 'type': 'object', 'properties': { 'name': {'type':'string'}, 'hobbies': { 'type': 'array', 'items': {'type':'string'} } } }"; JSchema schema = JSchema.Parse(schemaJson); Console.WriteLine(schema.Type); // Object foreach (var property in schema.Properties) { Console.WriteLine(property.Key + " - " + property.Value.Type); } // name - String // hobbies - Array