Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fwcd/swift-ordered-plist-encoder
Property list encoder that encodes dictionary keys in deterministic order
https://github.com/fwcd/swift-ordered-plist-encoder
plist property-list swift xml
Last synced: 2 months ago
JSON representation
Property list encoder that encodes dictionary keys in deterministic order
- Host: GitHub
- URL: https://github.com/fwcd/swift-ordered-plist-encoder
- Owner: fwcd
- License: mit
- Created: 2023-04-20T16:45:49.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-10-04T03:06:52.000Z (4 months ago)
- Last Synced: 2024-12-01T16:02:17.291Z (2 months ago)
- Topics: plist, property-list, swift, xml
- Language: Swift
- Homepage: https://fwcd.github.io/swift-ordered-plist-encoder/documentation/orderedplistencoder
- Size: 35.2 KB
- Stars: 3
- Watchers: 2
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ordered Property List Encoder for Swift
[![Build](https://github.com/fwcd/swift-ordered-plist-encoder/actions/workflows/build.yml/badge.svg)](https://github.com/fwcd/swift-ordered-plist-encoder/actions/workflows/build.yml)
[![Docs](https://github.com/fwcd/swift-ordered-plist-encoder/actions/workflows/docs.yml/badge.svg)](https://fwcd.github.io/swift-ordered-plist-encoder/documentation/orderedplistencoder)A custom XML property list encoder for Swift that encodes keys in the same order as they were declared, primarily intended for interoperability with legacy formats.
## Background
While the validity of a dictionary from a property list, like an object in JSON, ideally should be unaffected by the order of its keys, some plist-based formats such as the iTunes library XML format have implementations/parsers that depend on keys being 'conveniently' ordered (e.g. the id of the parent playlist is listed before the children). `PropertyListEncoder` from `Foundation` unfortunately does not offer this, hence this package.