Add NSCoding Support
jeffd opened this issue · comments
Jeff Dlouhy commented
By having a pure Swift implementation of a Graph, there's currently no way, as far as I can tell, to write a Graph to disk with NSKeyedArchiving / NSCoding.
David Kopec commented
That is correct. One could subclass Graph
, UnweightedGraph
, or WeightedGraph
and specify NSCoding
compliant vertices and add NSCoding conformance. Having such a class built-in to the framework would violate the framework's non-reliance on Foundation. I am interesting in exploring other serialization options including basic CSV text files for Graphs with String vertices, XML, and JSON.
David Kopec commented
The path forward on this will be conformance with the Swift 4 archival and serialization APIs.