Storage Documentation

Structure Any​Encodable

public struct AnyEncodable  

A struct defining an instance capable of being parsed into some generic JSON file.

%69 AnyEncodable AnyEncodable CustomStringConvertible CustomStringConvertible AnyEncodable->CustomStringConvertible Encodable Encodable AnyEncodable->Encodable CustomDebugStringConvertible CustomDebugStringConvertible AnyEncodable->CustomDebugStringConvertible

Conforms To

CustomDebugStringConvertible
CustomStringConvertible
Encodable

Initializers

init(_:​)

public init<T>(_ encodableValue: T)  

Init.

Parameters

encodable​Value T

Some encodable value.

Properties

description

public var description: String  

A human-readable description.

debug​Description

public var debugDescription: String  

A human-readable debug description.

Methods

to​Snake​Case()

public func toSnakeCase() -> AnyEncodable  

Change all keys to be encoded using snake case.

"someKey" -> "some_key".

Returns

Some AnyEncodable.

encode(to:​)

public func encode(to encoder: Encoder) throws  

Encode using some Encoder.

Throws

An EncodingError.