void IJsonSerializable.WriteProperties(Utf8JsonWriter json) { if (Key != null) { json.WriteStartObject(s_keyPropertyNameBytes); Key.WriteProperties(json); json.WriteEndObject(); } Properties.WriteAttributes(json); if (Properties._tags != null && Properties._tags.Count > 0) { json.WriteStartObject(s_tagsPropertyNameBytes); foreach (KeyValuePair <string, string> kvp in Properties._tags) { json.WriteString(kvp.Key, kvp.Value); } json.WriteEndObject(); } if (HardwareProtected.HasValue) { json.WriteBoolean(s_hsmPropertyNameBytes, HardwareProtected.Value); } if (ReleasePolicy != null) { json.WriteStartObject(s_releasePolicyPropertyNameBytes); ReleasePolicy.WriteProperties(json); json.WriteEndObject(); } }