Structure
AnyEncodable
public struct AnyEncodable
A struct
defining an instance
capable of being parsed into some
generic JSON file.
Relationships
Conforms To
CustomDebugStringConvertible
CustomStringConvertible
Encodable
Initializers
init(_:)
public init<T>(_ encodableValue: T)
Init.
Parameters
Name | Type | Description |
---|---|---|
encodableValue | T |
Some encodable value. |
Properties
Methods
toSnakeCase()
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
.