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 @@ -49,7 +49,8 @@ open class PropertyListEncoder {
49
49
}
50
50
51
51
/// Contextual user-provided information for use during encoding.
52
- open var userInfo : [ CodingUserInfoKey : Any ] {
52
+ @preconcurrency
53
+ open var userInfo : [ CodingUserInfoKey : any Sendable ] {
53
54
get {
54
55
optionsLock. lock ( )
55
56
defer { optionsLock. unlock ( ) }
@@ -74,7 +75,7 @@ open class PropertyListEncoder {
74
75
/// Options set on the top-level encoder to pass down the encoding hierarchy.
75
76
internal struct _Options {
76
77
var outputFormat : PropertyListDecoder . PropertyListFormat = . binary
77
- var userInfo : [ CodingUserInfoKey : Any ] = [ : ]
78
+ var userInfo : [ CodingUserInfoKey : any Sendable ] = [ : ]
78
79
}
79
80
80
81
/// The options set on the top-level encoder.
You can’t perform that action at this time.
0 commit comments