/// <summary> /// Serialize to a JSON object /// </summary> public new void SerializeJson(Utf8JsonWriter writer, JsonSerializerOptions options, bool includeStartObject = true) { if (includeStartObject) { writer.WriteStartObject(); } ((fhirCsR4.Models.BackboneElement) this).SerializeJson(writer, options, false); if (Coverage != null) { writer.WritePropertyName("coverage"); Coverage.SerializeJson(writer, options); } if (Inforce != null) { writer.WriteBoolean("inforce", (bool)Inforce !); } if (BenefitPeriod != null) { writer.WritePropertyName("benefitPeriod"); BenefitPeriod.SerializeJson(writer, options); } if ((Item != null) && (Item.Count != 0)) { writer.WritePropertyName("item"); writer.WriteStartArray(); foreach (CoverageEligibilityResponseInsuranceItem valItem in Item) { valItem.SerializeJson(writer, options, true); } writer.WriteEndArray(); } if (includeStartObject) { writer.WriteEndObject(); } }
/// <summary> /// Serialize to a JSON object /// </summary> public new void SerializeJson(Utf8JsonWriter writer, JsonSerializerOptions options, bool includeStartObject = true) { if (includeStartObject) { writer.WriteStartObject(); } ((fhirCsR4.Models.BackboneElement) this).SerializeJson(writer, options, false); if (Coverage != null) { writer.WritePropertyName("coverage"); Coverage.SerializeJson(writer, options); } if (Priority != null) { writer.WriteNumber("priority", (uint)Priority !); } if (includeStartObject) { writer.WriteEndObject(); } }
/// <summary> /// Serialize to a JSON object /// </summary> public new void SerializeJson(Utf8JsonWriter writer, JsonSerializerOptions options, bool includeStartObject = true) { if (includeStartObject) { writer.WriteStartObject(); } if (!string.IsNullOrEmpty(ResourceType)) { writer.WriteString("resourceType", (string)ResourceType !); } ((fhirCsR4.Models.DomainResource) this).SerializeJson(writer, options, false); if ((Identifier != null) && (Identifier.Count != 0)) { writer.WritePropertyName("identifier"); writer.WriteStartArray(); foreach (Identifier valIdentifier in Identifier) { valIdentifier.SerializeJson(writer, options, true); } writer.WriteEndArray(); } if (!string.IsNullOrEmpty(Status)) { writer.WriteString("status", (string)Status !); } if (_Status != null) { writer.WritePropertyName("_status"); _Status.SerializeJson(writer, options); } if (!string.IsNullOrEmpty(Created)) { writer.WriteString("created", (string)Created !); } if (_Created != null) { writer.WritePropertyName("_created"); _Created.SerializeJson(writer, options); } if (Insurer != null) { writer.WritePropertyName("insurer"); Insurer.SerializeJson(writer, options); } if (Provider != null) { writer.WritePropertyName("provider"); Provider.SerializeJson(writer, options); } if (Candidate != null) { writer.WritePropertyName("candidate"); Candidate.SerializeJson(writer, options); } if (Coverage != null) { writer.WritePropertyName("coverage"); Coverage.SerializeJson(writer, options); } if (includeStartObject) { writer.WriteEndObject(); } }