Skip to content

0.4.0

Latest
Compare
Choose a tag to compare
@finestructure finestructure released this 28 Nov 11:37
ea8eea9
  • Adds support for a semverString codable strategy that allows persisting the version more concisely. The default strategy remains defaultCodable, which encodes the struct with all fields exactly like the default Codable.
let stringEncoder = JSONEncoder()
stringEncoder.semanticVersionEncodingStrategy = .semverString
try stringEncoder.encode(v123) // 7 bytes -> "1.2.3", including quotes

Thank you to @chriseplettsonos for the contribution!