SwiftclassFoundation

class Foundation.JSONDecoder

Structure

What a query’s scopes step through. Every node here can be matched — see the syntax.

inherits{}

Members 16

  1. deinitdeinit
  2. fieldlet assumesTopLevelDictionaryKey: CodingUserInfoKey
  3. fieldvar options: Foundation.JSONDecoder._Options
  4. fieldlet optionsLock: Synchronization.Mutex<()>
  5. funcdecode<A where A: Decodable>(_: A.Type, from: Foundation.Data) throws -> A
  6. funcdecode<A where A: Foundation.DecodableWithConfiguration>(_: A.Type, from: Foundation.Data, configuration: A.DecodingConfiguration) throws -> A
  7. funcdecode<A, B where A: Foundation.DecodableWithConfiguration, B: Foundation.DecodingConfigurationProviding, A.DecodingConfiguration == B.DecodingConfiguration>(_: A.Type, from: Foundation.Data, configuration: B.Type) throws -> A
  8. initFoundation.JSONDecoder.__allocating_init() -> Foundation.JSONDecoder
  9. typealiastypealias Input = Foundation.Data
  10. varvar allowsJSON5: Bool { get set }
  11. varvar assumesTopLevelDictionary: Bool { get set }
  12. varvar dataDecodingStrategy: Foundation.JSONDecoder.DataDecodingStrategy { get set }
  13. varvar dateDecodingStrategy: Foundation.JSONDecoder.DateDecodingStrategy { get set }
  14. varvar keyDecodingStrategy: Foundation.JSONDecoder.KeyDecodingStrategy { get set }
  15. varvar nonConformingFloatDecodingStrategy: Foundation.JSONDecoder.NonConformingFloatDecodingStrategy { get set }
  16. varvar userInfo: [CodingUserInfoKey : Any] { get set }
@_objcRuntimeName(_TtC10Foundation13__JSONDecoder)
class JSONDecoder {
    enum DateDecodingStrategy {
        case formatted(__C.NSDateFormatter)
        case custom(@Sendable (_: any Swift.Decoder) throws -> Foundation.Date)
        case deferredToDate
        case secondsSince1970
        case millisecondsSince1970
        case iso8601
    }
    enum DataDecodingStrategy {
        case custom(@Sendable (_: any Swift.Decoder) throws -> Foundation.Data)
        case deferredToData
        case base64
    }
    enum NonConformingFloatDecodingStrategy {
        case convertFromString(positiveInfinity: Swift.String, negativeInfinity: Swift.String, nan: Swift.String)
        case throw
    }
    enum KeyDecodingStrategy {
        case custom(@Sendable (_: [any Swift.CodingKey]) -> any Swift.CodingKey)
        case useDefaultKeys
        case convertFromSnakeCase
    }
    struct _Options {
        var dateDecodingStrategy: Foundation.JSONDecoder.DateDecodingStrategy
        var dataDecodingStrategy: Foundation.JSONDecoder.DataDecodingStrategy
        var nonConformingFloatDecodingStrategy: Foundation.JSONDecoder.NonConformingFloatDecodingStrategy
        var keyDecodingStrategy: Foundation.JSONDecoder.KeyDecodingStrategy
        var userInfo: [Swift.CodingUserInfoKey : Any]
        var json5: Swift.Bool
    }
    let assumesTopLevelDictionaryKey: Swift.CodingUserInfoKey
    var options: Foundation.JSONDecoder._Options
    let optionsLock: Synchronization.Mutex<()>

    var dateDecodingStrategy: Foundation.JSONDecoder.DateDecodingStrategy {
        get
        set
    }
    var dataDecodingStrategy: Foundation.JSONDecoder.DataDecodingStrategy {
        get
        set
    }
    var nonConformingFloatDecodingStrategy: Foundation.JSONDecoder.NonConformingFloatDecodingStrategy {
        get
        set
    }
    var keyDecodingStrategy: Foundation.JSONDecoder.KeyDecodingStrategy {
        get
        set
    }
    var userInfo: [Swift.CodingUserInfoKey : Any] {
        get
        set
    }
    var allowsJSON5: Swift.Bool {
        get
        set
    }
    var assumesTopLevelDictionary: Swift.Bool {
        get
        set
    }
    init()
    func decode<A>(_: A.Type, from: Foundation.Data) throws -> A where A: Swift.Decodable
    func decode<A>(_: A.Type, from: Foundation.Data, configuration: A.DecodingConfiguration) throws -> A where A: Foundation.DecodableWithConfiguration
    func decode<A, B>(_: A.Type, from: Foundation.Data, configuration: B.Type) throws -> A where A: Foundation.DecodableWithConfiguration, B: Foundation.DecodingConfigurationProviding, A.DecodingConfiguration == B.DecodingConfiguration

    deinit
}