public static void WriteTagsProperty(this IFastJsonWriter writer, string name, ImmutableArray <string> tags) { writer.WritePropertyStartArray(name); foreach (var tag in tags) { writer.WriteValue(FastConvert.StringToLowerInvariantString(tag)); } writer.WriteEndArray(); }
public static void WriteTaggedText(this IFastJsonWriter writer, TaggedText text, bool selected) { writer.WriteStartObject(); writer.WriteProperty("text", text.Text); writer.WriteProperty("kind", FastConvert.StringToLowerInvariantString(text.Tag)); if (selected) { writer.WriteProperty("selected", true); } writer.WriteEndObject(); }