[swift-corelibs-dev] NSJSONSerialization and bridging

Tony Parker anthony.parker at apple.com
Fri Mar 4 16:44:31 CST 2016


Hi Ian,

We haven’t really made any progress in this area, unfortunately.

It would be awesome if someone could take up the banner of getting bridging to work on non-ObjC platforms. That would make this performance problem on Linux significantly less burdensome.

- Tony

> On Mar 4, 2016, at 9:24 AM, Ian Partridge via swift-corelibs-dev <swift-corelibs-dev at swift.org> wrote:
> 
> Hi, I've been reviewing the current status of NSJSONSerialization.
> 
> There is an implementation of JSONObjectWithData() and some tests, but
> dataWithJSONObject() is unimplemented.
> 
> One thing I noticed is that the signature of JSONObjectWithData() has
> been modified so it returns Any instead of AnyObject.  I guess this is
> to allow bridging to stdlib types like Dictionary and Array?
> 
> Should a future implementation of dataWithJSONObject() accept Any
> instead of AnyObject to match?  What are the consequences for
> compatibility with existing code that uses NSJSONSerialization?
> 
> Finally, is there any progress to report on the bridging issue?  The
> lack of bridging between stdlib and Foundation types on Linux is a
> pain point at the moment.
> 
> Thanks for your time!
> 
> -- 
> Ian Partridge
> _______________________________________________
> swift-corelibs-dev mailing list
> swift-corelibs-dev at swift.org
> https://lists.swift.org/mailman/listinfo/swift-corelibs-dev



More information about the swift-corelibs-dev mailing list