[swift-users] Archival & Serialization: What's meant by contrasting type un/safety of existing JSON serializers?

Jeremy W. Sherman jeremyw.sherman at gmail.com
Mon Jun 5 10:22:02 CDT 2017


What does the Archival & Serialization SE-0166 mean by:

> Some libraries, like SwiftyJSON, do this [interface between JSON and
Swift] at the cost of type safety; others, like ObjectMapper and Argo
below, maintain type safety by offering archival functionality for JSON
types (
https://github.com/apple/swift-evolution/blob/master/proposals/0166-swift-archival-serialization.md#jsonserialization-friction-and-third-party-solutions-motivation
)

I missed the review period (mea culpa), but I'd like to understand where
the authors are coming from here.

My first questions were:

- How is SwiftyJSON type-unsafe?
- How does "offering archival functionality for JSON types" as in Argo or
ObjectMapper recover type-safety?

On further thought, I don't think type-un/safety is what's at play here,
but I'm having trouble working out what was meant by that so I can rephrase
in my own terms. Perhaps one of the authors can elaborate?

Thanks!
--
Jeremy W. Sherman
https://jeremywsherman.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-users/attachments/20170605/6add8a31/attachment.html>


More information about the swift-users mailing list