OrderedDictionary

1.1.1

A Swift OrderedDictionary implementation based off of a Dictionary and an Array
mattpolzin/OrderedDictionary

OrderedDictionary

This very naive implementation is inspired by ones such as used to be included in some of IBM's Kitura codebases.

It is well tested and it solves two problems with the Foundation Dictionary type when encoding/decoding:

  1. It supports keyed encoding/decoding as long as the OrderedDictionary keys are either LosslessStringConvertible or RawRepresentable as String.
  2. It retains ordering information while encoding/decoding. Although neither JSON nor YAML give syntactic value to the ordering of dictionaries, the ordering can still have semantic value to the next consumer of the JSON or YAML.

Description

  • Swift Tools 5.1.0
View More Packages from this Author

Dependencies

Last updated: Tue Nov 08 2022 08:00:39 GMT-0500 (GMT-05:00)