devsite/tools/jazzy/templates

FirebaseFirestore Framework Reference

ExplicitNull

@propertyWrapper
public struct ExplicitNull<Value>
extension ExplicitNull: Equatable where Value: Equatable
extension ExplicitNull: Hashable where Value: Hashable
extension ExplicitNull: Encodable where Value: Encodable
extension ExplicitNull: Decodable where Value: Decodable

Wraps an Optional field in a Codable object such that when the field has a nil value it will encode to a null value in Firestore. Normally, optional fields are omitted from the encoded document.

This is useful for ensuring a field is present in a Firestore document, even when there is no associated value.

  • Declaration

    Swift

    public func encode(to encoder: Encoder) throws
  • Declaration

    Swift

    public init(from decoder: Decoder) throws

Firebase gives you the tools and infrastructure you need to build better mobile and web apps, improve app quality, and grow your business.

Updated Jan 17, 2025

Developer documentation for Firebase

Updated Feb 20, 2025

Developer documentation for Firebase

Updated Feb 20, 2025