> On Jun 22, 2016, at 10:14 PM, Alsey Miller via swift-evolution
> <[email protected]> wrote:
>
> Add a struct Null to the Swift 3.0 Foundation value types. As a struct, Null
> is more performant (no ARC or memory allocation) than NSNull, and will be
> needed for Swift JSON decoders and libraries that want to use struct value
> types, and be free from classes for their model layer.
>
I assume you are thinking of [String:SomeRootJSONProtocol] as the Object type?
However, once you reference the data as a protocol however, it will be promoted
and stored as a reference type.
I’ve preferred a similar approach to the following for JSON (although this
isn’t my code):
https://gist.github.com/dorentus/1e2132edfb174028bf11#file-json-swift-L30-L38
-DW
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution