Skip to content

Add `OrderedDictionary`

Pre-release
Pre-release

Choose a tag to compare

@mattpolzin mattpolzin released this 23 Jan 06:11
4a42df0

⚠️ Breaking Changes ⚠️
Many of the Dictionary types have been replaced by a new OrderedDictionary. This means that encoding and decoding can retain the ordering of JSON/YAML objects. This ability is still contingent upon the specific encoder or decoder being used retaining that information in the course of its duties.

The Foundation library JSONEncoder retains ordering on OS X, but does not on Linux. The Foundation JSONDecoder does not retain ordering on any operating system. There is, however, currently an alternative that does retain ordering on all operating systems and seems worth trying: FineJSON.

The most popular YAML decoder/encoder, Yams, does retain ordering.