FailableJSONRepresentable
public protocol FailableJSONRepresentable
A type that can be converted to a JSON
instance, with potential errors.
-
failableJSON()
Default implementationGets the
JSON
representation of the instance.Throws
Failures to convert one of the instance’s values to aJSON
representation.Default Implementation
The default implementation of
FailableJSONRepresentable.failableJSON()
for type that conform toSafeJSONRepresentable
.Throws
This implementation never throws.Declaration
Swift
func failableJSON() throws -> JSON
Return Value
The
JSON
structure that represents the instance.