-
Notifications
You must be signed in to change notification settings - Fork 67
/
README.txt
61 lines (46 loc) · 1.74 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
-----------------
DESCRIPTION
-----------------
This is a C# Property List (plist) serialization library (MIT license).
It supports both XML and binary versions of the plist format.
plist C#
__________________________________________________________________________________
string string
integer short, int, long
real double
dictionary Dictionary<string, object>
array List<object>
date DateTime
data List<byte>
boolean bool
-----------------
USAGE
-----------------
See PlistCS/PlistCS/plistTests.cs for examples of reading and
writing all types to both XML and binary. E.g. to read a plist from disk whose
root node is a dictionary:
Dictionary<string, object> dict = (Dictionary<string, object>)Plist.readPlist("testBin.plist");
The plist format (binary or XML) is automatically detected so call the same
readPlist method for XML
Dictionary<string, object> dict = (Dictionary<string, object>)Plist.readPlist("testXml.plist");
To write a plist, e.g. dictionary
Dictionary<string, object> dict = new Dictionary<string, object>
{
{"String Example", "Hello There"},
{"Integer Example", 1234}
};
Plist.writeXml(dict, "xmlTarget.plist");
and for a binary plist
Dictionary<string, object> dict = new Dictionary<string, object>
{
{"String Example", "Hello There"},
{"Integer Example", 1234}
};
Plist.writeBinary(dict, "xmlTarget.plist");
The other public methods allow for reading and writing from streams and byte
arrays. Again, see the test suite code PlistCS/PlistCS/plistTests.cs
for comprehensive examples.
---------------
AUTHOR
---------------
Mark Tilton, Animetrics Inc.