[swift-corelibs-dev] NSJSONSerialization and bridging

Ian Partridge ipartridge at gmail.com
Fri Mar 4 11:24:16 CST 2016


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


More information about the swift-corelibs-dev mailing list