SubscriptingOptions
public struct SubscriptingOptions: OptionSet
An OptionSetType
used to represent the different options available for subscripting JSON
with null
values or missing keys.
* .NullBecomesNil
- Treat null
values as nil
.
* .MissingKeyBecomesNil
- Treat missing keys as nil
.
-
An
OptionSetType
used to represent the different options available for subscriptingJSON
withnull
values or missing keys. *.NullBecomesNil
- Treatnull
values asnil
. *.MissingKeyBecomesNil
- Treat missing keys asnil
.Declaration
Swift
public let rawValue: Int
-
An
OptionSetType
used to represent the different options available for subscriptingJSON
withnull
values or missing keys. *.NullBecomesNil
- Treatnull
values asnil
. *.MissingKeyBecomesNil
- Treat missing keys asnil
.Declaration
Swift
public init(rawValue: Int)
Parameters
rawValue
The raw value of the option set to create. Each bit of
rawValue
potentially represents an element of the option set, though raw values may include bits that are not defined as distinct values of theOptionSet
type. -
Treat
null
values asnil
.Declaration
Swift
public static let NullBecomesNil = SubscriptingOptions(rawValue: 1 << 0)
-
Treat missing keys as
nil
.Declaration
Swift
public static let MissingKeyBecomesNil = SubscriptingOptions(rawValue: 1 << 1)