osrm-text-instructions.swift icon indicating copy to clipboard operation
osrm-text-instructions.swift copied to clipboard

Deserialize JSON instructions into struct

Open 1ec5 opened this issue 6 years ago • 0 comments

OSRMInstructionFormatter should immediately deserialize the JSON instructions into a strongly typed struct. This change would sharply reduce the number of implicitly unwrapped optionals (!) that could cause crashes and clean up the code significantly. Once we migrate to Swift 4, we’ll be able to take advantage of the Codable protocol to reduce the code size even further.

/cc @frederoni @freenerd

1ec5 avatar Aug 26 '17 00:08 1ec5