Although it looks like this list has grown pretty cold, many thanks to Bryon and Charles for answering quickly my question about Abdera extensions a few weeks ago. That's now working perfectly for me, but I have another question now and thought I'd try going back to the well...

One of the extensions we're using is to add a "via" attribute to the category item. That's easy to do using the Abdera API as follows:

        Feed feed = abdera.newFeed ();
        ...
        Category cat = feed.addCategory (term_value);
        cat.setAttributeValue ("via", via_value);

When writing out the document in XML, it works perfectly. For example, two category items in XML might look like this:

<category term="4500" via="author" />
<category term="SonicNOAA" via="user" />

That's exactly what I need. But I now need to also provide the same Atom document as JSON instead of XML. Fortunately, Abdera includes a very nice JSON conversion that handles most extensions, particularly those with namespaces, well. But it seems to ignore added XML attributes. The Abdera-generated JSON for the same document that produced the XML above produces this in JSON:

   "categories":[{
     "term":"4500"
    },{
     "term":"SonicNOAA"
    }
   ],

I.e., the "via" attribute has been lost.

Since using Feed.writeTo() to generate XML produces the desired result, I have some confidence that my Atom document is in some sense "correct." When writing that same Atom document to JSON instead of XML loses the "via" attribute, it seems that the JSON writer is incomplete.

So I have three questions. 1) Is that something that could be fixed by using the current version of Abdera differently? 2) Is it something that could be fixed by hacking on the Abdera source?

And a more general question, 3) Just what is the status of Abdera? It looks like it got promoted to a top-level Apache project in November 2008 and then froze at version 0.4. Is it progressing?

Thanks,
Johnny Tolliver
[email protected]
865-574-1305

Reply via email to