Skip to content

v1.7.0

Compare
Choose a tag to compare
@trasch trasch released this 02 Jul 12:24
· 10 commits to main since this release
831a87e

Always include the m value of Coordinate3D in JSON

The m value of Coordinate3D will now always be includeded in the JSON dump of a coordinate. This means that a null value will be added for the altitude if the coordinate's altitude is nil.

let coordinateM = Coordinate3D(latitude: 15.0, longitude: 10.0, altitude: nil, m: 1234)
let coordinateDataM = try JSONEncoder().encode(coordinateM)
print(String(data: coordinateDataM, encoding: .utf8)) // [10,15,null,1234]