JSONifiable
public protocol JSONifiable
A type that can be represented as JSON
-
toJSONDictionary()Default implementationProduce a JSON serializable dictionary that represents the type
Default Implementation
If the type is a
struct, produce a JSON serializable dictionary that represents thestructDeclaration
Swift
func toJSONDictionary() -> [String : Any] -
toJSONString()Default implementationSerialize the type to a pretty-printed JSON string
Default Implementation
Serialize the type to a pretty-printed JSON string
Declaration
Swift
func toJSONString() -> String
View on GitHub
JSONifiable Protocol Reference