Decodable

extension Decodable
  • Returns a value of the type you specify, decoded from a JSON dictionary. Returns nil in case the dictionary doesn’t contain non-nill value for non-optional corresponding property in T

    Declaration

    Swift

    public static func decodeJson<T: Decodable>(_ type: T.Type,
                                                  from dictionary: [String: Any?]) throws -> T
  • Undocumented

    Declaration

    Swift

    public static func decodeJson<T: Decodable>(_ type: T.Type,
                                                  from dictionary: [String: Any?],
                                                  snakeCase: Bool) throws -> T