File tree 4 files changed +12
-8
lines changed
Sources/FoundationEssentials 4 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -257,7 +257,8 @@ open class JSONDecoder {
257
257
}
258
258
259
259
/// Contextual user-provided information for use during decoding.
260
- open var userInfo : [ CodingUserInfoKey : Any ] {
260
+ @preconcurrency
261
+ open var userInfo : [ CodingUserInfoKey : any Sendable ] {
261
262
get {
262
263
optionsLock. lock ( )
263
264
defer { optionsLock. unlock ( ) }
@@ -309,7 +310,7 @@ open class JSONDecoder {
309
310
var dataDecodingStrategy : DataDecodingStrategy = . base64
310
311
var nonConformingFloatDecodingStrategy : NonConformingFloatDecodingStrategy = . throw
311
312
var keyDecodingStrategy : KeyDecodingStrategy = . useDefaultKeys
312
- var userInfo : [ CodingUserInfoKey : Any ] = [ : ]
313
+ var userInfo : [ CodingUserInfoKey : any Sendable ] = [ : ]
313
314
var json5 : Bool = false
314
315
}
315
316
Original file line number Diff line number Diff line change @@ -295,7 +295,8 @@ open class JSONEncoder {
295
295
}
296
296
297
297
/// Contextual user-provided information for use during encoding.
298
- open var userInfo : [ CodingUserInfoKey : Any ] {
298
+ @preconcurrency
299
+ open var userInfo : [ CodingUserInfoKey : any Sendable ] {
299
300
get {
300
301
optionsLock. lock ( )
301
302
defer { optionsLock. unlock ( ) }
@@ -324,7 +325,7 @@ open class JSONEncoder {
324
325
var dataEncodingStrategy : DataEncodingStrategy = . base64
325
326
var nonConformingFloatEncodingStrategy : NonConformingFloatEncodingStrategy = . throw
326
327
var keyEncodingStrategy : KeyEncodingStrategy = . useDefaultKeys
327
- var userInfo : [ CodingUserInfoKey : Any ] = [ : ]
328
+ var userInfo : [ CodingUserInfoKey : any Sendable ] = [ : ]
328
329
}
329
330
330
331
/// The options set on the top-level encoder.
Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ open class PropertyListDecoder {
38
38
// MARK: Options
39
39
40
40
/// Contextual user-provided information for use during decoding.
41
- open var userInfo : [ CodingUserInfoKey : Any ] {
41
+ @preconcurrency
42
+ open var userInfo : [ CodingUserInfoKey : any Sendable ] {
42
43
get {
43
44
optionsLock. lock ( )
44
45
defer { optionsLock. unlock ( ) }
@@ -62,7 +63,7 @@ open class PropertyListDecoder {
62
63
63
64
/// Options set on the top-level encoder to pass down the decoding hierarchy.
64
65
internal struct _Options {
65
- var userInfo : [ CodingUserInfoKey : Any ] = [ : ]
66
+ var userInfo : [ CodingUserInfoKey : any Sendable ] = [ : ]
66
67
}
67
68
68
69
/// The options set on the top-level decoder.
Original file line number Diff line number Diff line change @@ -51,7 +51,8 @@ open class PropertyListEncoder {
51
51
}
52
52
53
53
/// Contextual user-provided information for use during encoding.
54
- open var userInfo : [ CodingUserInfoKey : Any ] {
54
+ @preconcurrency
55
+ open var userInfo : [ CodingUserInfoKey : any Sendable ] {
55
56
get {
56
57
optionsLock. lock ( )
57
58
defer { optionsLock. unlock ( ) }
@@ -76,7 +77,7 @@ open class PropertyListEncoder {
76
77
/// Options set on the top-level encoder to pass down the encoding hierarchy.
77
78
internal struct _Options {
78
79
var outputFormat : PropertyListDecoder . PropertyListFormat = . binary
79
- var userInfo : [ CodingUserInfoKey : Any ] = [ : ]
80
+ var userInfo : [ CodingUserInfoKey : any Sendable ] = [ : ]
80
81
}
81
82
82
83
/// The options set on the top-level encoder.
You can’t perform that action at this time.
0 commit comments