plist

New in version 1.1.0.

Apple/NeXT Property List serialization.

DTD:http://www.apple.com/DTDs/PropertyList-1.0.dtd

Example

{
  "string": "Doodah",
  "integer": 728,
  "float": 0.1,
  "date": datetime.now(),
  "items": ["A", "B", 12, 32.1, [1, 2, 3]],
  "dict": {
    "str": "<hello & hi there!>",
    "unicode": u'M\xe4ssig, Ma\xdf',
    "true value": True,
    "false value": False,
  ),
  "data": data("<binary gunk>"),
  "more_data": data("<lots of binary gunk>" * 10)
}
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN"
  "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
  <dict>
    <key>string</key>
    <string>Doodah</string>
    <key>integer</key>
    <integer>728</integer>
    <key>float</key>
    <real>0.10000000000000001</real>
    <key>date</key>
    <date>2009-02-22T17:19:43Z</date>
    <key>items</key>
    <array>
      <string>A</string>
      <string>B</string>
      <integer>12</integer>
      <real>32.100000000000001</real>
      <array>
        <integer>1</integer>
        <integer>2</integer>
        <integer>3</integer>
      </array>
    </array>
    <key>dict</key>
    <dict>
      <key>str</key>
      <string>&lt;hello &amp; hi there!&gt;</string>
      <key>unicode</key>
      <string>Mässig, Maß</string>
      <key>true value</key>
      <true/>
      <key>false value</key>
      <false/>
    </dict>
    <key>data</key>
    <data>PGJpbmFyeSBndW5rPg==</data>
    <key>more_data</key>
    <data>
      PGxvdHMgb2YgYmluYXJ5IGd1bms+PGxvdHMgb2YgYmluYXJ5IGd1bms+PGxvdHMgb2Yg
      YmluYXJ5IGd1bms+PGxvdHMgb2YgYmluYXJ5IGd1bms+PGxvdHMgb2YgYmluYXJ5IGd1
      bms+PGxvdHMgb2YgYmluYXJ5IGd1bms+PGxvdHMgb2YgYmluYXJ5IGd1bms+PGxvdHMg
      b2YgYmluYXJ5IGd1bms+PGxvdHMgb2YgYmluYXJ5IGd1bms+PGxvdHMgb2YgYmluYXJ5
      IGd1bms+
    </data>
  </dict>
</plist>

Classes

class smisk.serialization.plist.XMLPlistSerializer(XMLSerializer)

XML Property List serializer.

Note that the None type is not supported by Property List 1.0.

name
Value:“XML Property List”
extensions
Value:(“plist”,)
media_types
Value:(“application/plist+xml”,)
charset
Value:“utf-8”
can_serialize
Value:True
can_unserialize
Value:True
serialize(params, charset):
See smisk.serialization.Serializer.serialize() for more information.
unserialize(file, length=-1, charset=None):
See smisk.serialization.Serializer.unserialize() for more information.