Enumeration
JSONValue
A lossless JSON/YAML-compatible value type used for dynamically-typed action options.
@frozen enum JSONValueOverview
Used wherever action options are decoded from Shipfile YAML or CLI JSON flags without a statically known type.
Example
let options: JSONValue = .object([
"scheme": .string("MyApp"),
"verbose": .bool(true),
"retryCount": .int(3)
])Topics
Enumeration Cases
case array([JSONValue])A JSON array value.
case bool(Bool)A JSON boolean value.
case double(Double)A JSON floating-point value.
case int(Int)A JSON integer value.
case nullA JSON null value.
case object([String : JSONValue])A JSON object (dictionary) value.
case string(String)A JSON string value.
Initializers
Instance Properties
var arrayValue: [JSONValue]?Returns the array value if this is an
.arraycase, otherwisenil.var boolValue: Bool?Returns the bool value if this is a
.boolcase, otherwisenil.var doubleValue: Double?Returns the double value if this is a
.doublecase, otherwisenil.var intValue: Int?Returns the integer value if this is an
.intcase, otherwisenil.var isNull: BoolReturns whether this value represents JSON null.
var objectValue: [String : JSONValue]?Returns the object value if this is an
.objectcase, otherwisenil.var stringValue: String?Returns the string value if this is a
.stringcase, otherwisenil.
Instance Methods
Default Implementations
Equatable ImplementationsExpressibleByArrayLiteral ImplementationsExpressibleByBooleanLiteral ImplementationsExpressibleByDictionaryLiteral ImplementationsExpressibleByExtendedGraphemeClusterLiteral ImplementationsExpressibleByFloatLiteral ImplementationsExpressibleByIntegerLiteral ImplementationsExpressibleByNilLiteral ImplementationsExpressibleByStringLiteral Implementations
Relationships
Conforms To
Swift.CopyableSwift.DecodableSwift.EncodableSwift.EquatableSwift.EscapableSwift.ExpressibleByArrayLiteralSwift.ExpressibleByBooleanLiteralSwift.ExpressibleByDictionaryLiteralSwift.ExpressibleByExtendedGraphemeClusterLiteralSwift.ExpressibleByFloatLiteralSwift.ExpressibleByIntegerLiteralSwift.ExpressibleByNilLiteralSwift.ExpressibleByStringLiteralSwift.ExpressibleByUnicodeScalarLiteralSwift.HashableSwift.SendableSwift.SendableMetatype