GeoJSON
public class GeoJSON : Codable
Undocumented
-
Undocumented
Declaration
Swift
public var decoded: Codable?
-
Undocumented
Declaration
Swift
public var decodedFeature: Feature? { get }
-
Undocumented
Declaration
Swift
public var decodedFeatureCollection: FeatureCollection? { get }
-
Declaration
Swift
public required init(from decoder: Decoder) throws
-
Declaration
Swift
public func encode(to encoder: Encoder) throws
-
Parse JSON encoded data into a GeoJSON of unknown type.
Throws
GeoJSONError
if the type is not compatible.Declaration
Swift
public static func parse(_ data: Data) throws -> GeoJSON
Parameters
data
the JSON encoded GeoJSON data.
Return Value
decoded GeoJSON of any compatible type.
-
Parse JSON encoded data into a GeoJSON of known type.
Throws
GeoJSONError
if the type is not compatible.Declaration
Swift
public static func parse<T>(_ type: T.Type, from data: Data) throws -> T where T : GeoJSONObject
Parameters
type
The known GeoJSON type (T).
data
the JSON encoded GeoJSON data.
Return Value
decoded GeoJSON of type T.