Comment 11 for bug 135428

Revision history for this message
Anand Chitipothu (anandology) wrote : Re: [Bug 135428] Re: set up read/write edit API

>
> <entry xmlns="http://www.w3.org/2005/Atom"
> xmlns:i="http://infogami.org/schema"
> xmlns:d="http://demo.openlibrary.org/type/page">
> <i:type>type/page</type>
> <d:title>Foo</d:title>
> <d:body>Bar</d:body>
> </entry>

There is a problem with this approach. How to represent lists?
Because we are not showing the parent information, there is also a
need to represent dictionaries sometimes.
For example, value of properties field of /type/page/feed is list of
dicts.

['title': {'type': 'type/string', 'unique': True, 'description':''},
'body' : {'type': 'type/text', 'unique':True, 'description': ''}]

I think plist kind of format suits better than above flat format.

<entry xmlns="http://www.w3.org/2005/Atom">
     <key>name</key>
     <string>type/page</string>
     <key>created</key>
     <timestamp>2006-01-23T16:26:03-08:00</timestamp>
     <key>author</key>
     <ref>user/anand</ref>
     <key>type</key>
     <ref>type/type</ref>
     <key>revision</key>
     <int>7</int>
     <key>data</key>
     <dict>
         <key>description</key>
         <string></string>
         <key>is_primitive</string>
         <boolean>false</boolean>
         <key>properties</key>
         <list>
             <key>title</key>
             <dict>
                 <key>type</key>
                 <ref>type/string</ref>
                 <key>unique</key>
                 <boolean>true</ref>
                 <key>description</key>
                 <string></string>
             </dict>
             <key>body</key>
             <dict>
                 <key>type</key>
                 <ref>type/text</ref>
                 <key>unique</key>
                 <boolean>true</ref>
                 <key>description</key>
                 <string></string>
             </dict>
         </list>
</entry>