LDValue
public enum LDValue: Codable,
                     Equatable,
                     ExpressibleByNilLiteral,
                     ExpressibleByBooleanLiteral,
                     ExpressibleByIntegerLiteral,
                     ExpressibleByFloatLiteral,
                     ExpressibleByStringLiteral,
                     ExpressibleByArrayLiteral,
                     ExpressibleByDictionaryLiteralextension LDValue: LDValueConvertibleAn immutable instance of any data type that is allowed in JSON.
An LDValue can be a null (that is, an instance that represents a JSON null value), a boolean, a number (always
encoded internally as double-precision floating-point), a string, an ordered list of LDValue values (a JSON array),
or a map of strings to LDValue values (a JSON object).
This can be used to represent complex data in a context attribute, or to get a feature flag value that uses a complex type or does not always use the same type.
- 
                  
                  DeclarationSwift public typealias StringLiteralType = String
- 
                  
                  DeclarationSwift public typealias ArrayLiteralElement = LDValue
- 
                  
                  DeclarationSwift public typealias Key = String
- 
                  
                  DeclarationSwift public typealias Value = LDValue
- 
                  
                  DeclarationSwift public typealias IntegerLiteralType = Double
- 
                  
                  DeclarationSwift public typealias FloatLiteralType = Double
- 
                  
                  Represents a JSON null value. DeclarationSwift case null
- 
                  
                  Represents a JSON boolean value. DeclarationSwift case bool(Bool)
- 
                  
                  Represents a JSON number value. DeclarationSwift case number(Double)
- 
                  
                  Represents a JSON string value. DeclarationSwift case string(String)
- 
                  
                  Represents an array of JSON values. DeclarationSwift case array([LDValue])
- 
                  
                  Represents a JSON object. DeclarationSwift case object([String : LDValue])
- 
                  
                  DeclarationSwift public init(nilLiteral: ())
- 
                  
                  DeclarationSwift public init(booleanLiteral: Bool)
- 
                  
                  Create an LDValue representation from the provided Double value. This method DOES NOT truncate the provided Double. As JSON numeric values are always treated as double-precision, this method will store the given Double as it. DeclarationSwift @available(*, deprecated, message: "Use LDValue.init(integerLiteral: Int﹚ or LDValue.init(floatLiteral: Double﹚") public init(integerLiteral: Double)
- 
                  
                  Create an LDValue representation from the provided Int. All JSON numeric types are represented as double-precision so the provided Int will be cast to a Double. DeclarationSwift public init(integerLiteral: Int)
- 
                  
                  Create an LDValue representation from the provided Double. DeclarationSwift public init(floatLiteral: Double)
- 
                  
                  DeclarationSwift public init(stringLiteral: String)
- 
                  
                  DeclarationSwift public init(arrayLiteral: LDValue...)
- 
                  
                  DeclarationSwift public init(dictionaryLiteral: (String, LDValue)...)
- 
                  
                  DeclarationSwift public init(from decoder: Decoder) throws
- 
                  
                  DeclarationSwift public func encode(to encoder: Encoder) throws
- 
                  
                  DeclarationSwift public func toLDValue() -> LDValue
 View on GitHub
View on GitHub