private void AddValueTypes(SaJsonValueType jsonValueType) { foreach (var dataType in jsonValueType.JsonDataTypes) { AddJsonDataType(dataType); } }
public static SaJsonSchema Create(StringBuilder sb, string jsonTag, SaJsonValueType primaryType, IEnumerable <string> jsonKeys) { var jsonSchema = new SaJsonSchema(sb) { Keys = jsonKeys }; // The root level schema for a SA if (jsonTag != null) { jsonSchema._jsonObject.StartObject(); jsonSchema.AddSchemaVersion(); // SA json is an object jsonSchema.AddJsonDataType(JsonDataType.Object); jsonSchema._jsonObject.StartObjectWithKey(jsonTag); } jsonSchema.AddValueTypes(primaryType); return(jsonSchema); }
public SaJsonKeyProperties(SaJsonValueType valueType, CustomAnnotationCategories category, string description) { ValueType = valueType; Category = category; Description = description; }
public static SaJsonKeyAnnotation CreateFromProperties(SaJsonValueType valueType, CustomAnnotationCategories category, string description) { return(new SaJsonKeyAnnotation { Properties = new SaJsonKeyProperties(valueType, category, description) }); }