SwiftclassFoundation
class Foundation.JSONDecoder
Structure
What a query’s scopes step through. Every node here can be matched — see the syntax.
inherits{}
- protocolCombine.TopLevelDecoder
Members 16
- deinit
deinit - field
let assumesTopLevelDictionaryKey: CodingUserInfoKey - field
var options: Foundation.JSONDecoder._Options - field
let optionsLock: Synchronization.Mutex<()> - func
decode<A where A: Decodable>(_: A.Type, from: Foundation.Data) throws -> A - func
decode<A where A: Foundation.DecodableWithConfiguration>(_: A.Type, from: Foundation.Data, configuration: A.DecodingConfiguration) throws -> A - func
decode<A, B where A: Foundation.DecodableWithConfiguration, B: Foundation.DecodingConfigurationProviding, A.DecodingConfiguration == B.DecodingConfiguration>(_: A.Type, from: Foundation.Data, configuration: B.Type) throws -> A - init
Foundation.JSONDecoder.__allocating_init() -> Foundation.JSONDecoder - typealias
typealias Input = Foundation.Data - var
var allowsJSON5: Bool { get set } - var
var assumesTopLevelDictionary: Bool { get set } - var
var dataDecodingStrategy: Foundation.JSONDecoder.DataDecodingStrategy { get set } - var
var dateDecodingStrategy: Foundation.JSONDecoder.DateDecodingStrategy { get set } - var
var keyDecodingStrategy: Foundation.JSONDecoder.KeyDecodingStrategy { get set } - var
var nonConformingFloatDecodingStrategy: Foundation.JSONDecoder.NonConformingFloatDecodingStrategy { get set } - var
var userInfo: [CodingUserInfoKey : Any] { get set }
Header
@_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 }