deser-plist
Property list support for
deser. Property lists are the
configuration and serialization format of Apple's platforms: Info.plist
files, preferences, Xcode projects, .strings files and keyed archives.
All three formats are supported. Deserialization detects the format, the serializer writes the format of its configuration (XML by default):
use ;
use ;
let info = Info ;
let xml = to_vec.unwrap;
let binary = builder
.format.build
.to_vec
.unwrap;
assert_eq!;
assert_eq!;
assert_eq!;
- Reads XML, binary (
bplist00) and OpenStep property lists including.stringsfiles and text in UTF-16. - Writes XML and binary property lists like Core Foundation does: the XML
output and the layout of binary property lists match
plutil. OpenStep is written in the style of Xcode. - Dates map onto deser's well-known
Timestamp, sostd::time::SystemTimeand the timestamp types ofjiff,chronoandtimework with the respective features of deser. - UIDs of
NSKeyedArchiverarchives are passed through asUid, which falls back to an integer. In XML they areCF$UIDdictionaries. - Keys of dictionaries (and all strings of OpenStep property lists) are lexical, so they deserialize into numbers and booleans.
- Strings and data are borrowed from the input where possible.
- Deeply nested input does not overflow the stack. Shared objects of binary property lists are supported, cycles are an error.
- Works without the standard library (with
alloc).
The tests run the test files of the plist
crate and compare the results
against Apple's plutil.
License and Links
- Issue Tracker
- Documentation
- License: Apache-2.0