private void AddAnnotation(SaJsonKeyAnnotation annotation) { if (annotation.Properties != null) { AddAnnotationProperties(annotation); } else { _sb.Append(annotation.Schema); _jsonObject.EndObject(); } }
private void AddAnnotationProperties(SaJsonKeyAnnotation annotation) { AddValueTypes(annotation.Properties.ValueType); int numComplexTypes = annotation.Properties.ValueType.JsonDataTypes.Count(x => x.IsComplexType()); while (numComplexTypes > 0) { _jsonObject.EndObject(); numComplexTypes--; } if (annotation.Properties.Category != CustomAnnotationCategories.Unknown) { _jsonObject.AddStringValue("category", annotation.Properties.Category.ToString()); } if (annotation.Properties.Description != null) { _jsonObject.AddStringValue("description", annotation.Properties.Description); } }
public void AddAnnotation(string key, SaJsonKeyAnnotation annotation) { _keyAnnotation.Add(key, annotation); KeyCounts.Add(key, 0); }