FirebaseAILogic Framework Reference

JSONValue

@available(iOS15.0,macOS12.0,tvOS15.0,watchOS8.0,*)publicenumJSONValue:Sendable
extensionJSONValue:Decodable
extensionJSONValue:Encodable
extensionJSONValue:Equatable

Represents a value in one of JSON’s data types.

This may be decoded from, or encoded to, agoogle.protobuf.Value.

  • Anull value.

    Declaration

    Swift

    casenull
  • A numeric value.

    Declaration

    Swift

    casenumber(Double)
  • A string value.

    Declaration

    Swift

    casestring(String)
  • A boolean value.

    Declaration

    Swift

    casebool(Bool)
  • A JSON object.

    Declaration

    Swift

    caseobject(JSONObject)
  • An array ofJSONValues.

    Declaration

    Swift

    casearray([JSONValue])
  • Declaration

    Swift

    publicinit(fromdecoder:Decoder)throws
  • Declaration

    Swift

    publicfuncencode(toencoder:Encoder)throws

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-10-28 UTC.