StorageCrypto Documentation

Structure Any​Decodable

@dynamicMemberLookup
public struct AnyDecodable  

A struct defining an instance capable of parsing some generic JSON file.

%119 AnyDecodable AnyDecodable CustomStringConvertible CustomStringConvertible AnyDecodable->CustomStringConvertible CustomDebugStringConvertible CustomDebugStringConvertible AnyDecodable->CustomDebugStringConvertible Decodable Decodable AnyDecodable->Decodable

Conforms To

CustomDebugStringConvertible
CustomStringConvertible
Decodable

Initializers

init(from:​)

public init(from decoder: Decoder) throws  

Init.

Parameters

decoder Decoder

Some Decoder.

Throws

A DecodingError.

Properties

bool

public var bool: Bool?  

Simplify into an optional Bool.

double

public var double: Double?  

Simplify into an optional Double.

int

public var int: Int?  

Simplify into an optional Int.

string

public var string: String?  

Simplify into an optional String.

array

public var array: [AnyDecodable]?  

Simplify into an optional Array.

description

public var description: String  

A human-readable description.

debug​Description

public var debugDescription: String  

A human-readable debug description.

Methods

from​Snake​Case()

public func fromSnakeCase() -> AnyDecodable  

Change all keys to be decoded using camel case.

"some_key" -> "someKey".

Returns

Some AnyDecodable.

from​Snake​Case(_:​)

public func fromSnakeCase(_ shouldConvertFromSnakeCase: Bool) -> AnyDecodable  

Change all keys to be decoded using camel case.

"some_key" -> "someKey".

Parameters

should​Convert​From​Snake​Case Bool

Whether it should convert to camel case or not (e.g. "some_key" to "someKey").

Returns

Some AnyDecodable.