This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//: # Swift 3: JSON-serializable structs using protocols | |
//: Most of the implementation is based on the code in [this blog post](http://codelle.com/blog/2016/5/an-easy-way-to-convert-swift-structs-to-json/) | |
import Foundation | |
//: ### Defining the protocols | |
protocol JSONRepresentable { | |
var JSONRepresentation: Any { get } | |
} | |
protocol JSONSerializable: JSONRepresentable {} |