AnyJSON
public struct AnyJSON : ExpressibleByStringLiteral, ExpressibleByArrayLiteral, ExpressibleByDictionaryLiteral, ExpressibleByIntegerLiteral, ExpressibleByFloatLiteral, ExpressibleByBooleanLiteral
A generic JSON value type that can be expressed with Swift Literals
-
Create an
AnyJSONfrom any typeDeclaration
Swift
public init(_ obj: Any)Parameters
objThe object
-
The object wrapped by this
AnyJSONwrapperDeclaration
Swift
public private(set) var obj: Any { get }
-
Declaration
Swift
public typealias Key = AnyHashable -
Declaration
Swift
public typealias Value = Any -
Declaration
Swift
public init(dictionaryLiteral elements: (AnyHashable, Any)...)
-
Declaration
Swift
public typealias StringLiteralType = String -
Declaration
Swift
public init(stringLiteral value: String)
-
Declaration
Swift
public typealias ArrayLiteralElement = AnyJSON -
Declaration
Swift
public init(arrayLiteral elements: ArrayLiteralElement...)
-
Declaration
Swift
public typealias FloatLiteralType = Double -
Declaration
Swift
public init(floatLiteral value: Double)
-
Declaration
Swift
public typealias IntegerLiteralType = Int -
Declaration
Swift
public init(integerLiteral value: Int)
-
Declaration
Swift
public typealias BooleanLiteralType = Bool -
Declaration
Swift
public init(booleanLiteral value: Bool)
-
Undocumented
Declaration
Swift
public subscript(key: AnyHashable) -> AnyJSON { get set } -
Undocumented
Declaration
Swift
public subscript(index: Int) -> AnyJSON { get set }
View on GitHub
Install in Dash
AnyJSON Structure Reference