abdera-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jmsn...@apache.org
Subject svn commit: r617939 - /incubator/abdera/java/trunk/extensions/json/src/main/java/org/apache/abdera/ext/json/JSONUtil.java
Date Sun, 03 Feb 2008 01:53:34 GMT
Author: jmsnell
Date: Sat Feb  2 17:53:33 2008
New Revision: 617939

URL: http://svn.apache.org/viewvc?rev=617939&view=rev
Log:
output control as a field

Modified:
    incubator/abdera/java/trunk/extensions/json/src/main/java/org/apache/abdera/ext/json/JSONUtil.java

Modified: incubator/abdera/java/trunk/extensions/json/src/main/java/org/apache/abdera/ext/json/JSONUtil.java
URL: http://svn.apache.org/viewvc/incubator/abdera/java/trunk/extensions/json/src/main/java/org/apache/abdera/ext/json/JSONUtil.java?rev=617939&r1=617938&r2=617939&view=diff
==============================================================================
--- incubator/abdera/java/trunk/extensions/json/src/main/java/org/apache/abdera/ext/json/JSONUtil.java
(original)
+++ incubator/abdera/java/trunk/extensions/json/src/main/java/org/apache/abdera/ext/json/JSONUtil.java
Sat Feb  2 17:53:33 2008
@@ -241,7 +241,8 @@
       writeList("contributors",entry.getContributors(),jstream);
       writeList("links",entry.getLinks(),jstream);
       writeList("categories",entry.getCategories(),jstream);
-      writeList("inreplyto",ThreadHelper.getInReplyTos(entry),jstream);            
+      writeList("inreplyto",ThreadHelper.getInReplyTos(entry),jstream);  
+      writeElement("control", entry.getControl(), jstream);
       writeExtensions((ExtensibleElement)element,jstream);
       jstream.endObject();
     } else if (element instanceof Generator) {
@@ -555,7 +556,8 @@
     jstream.startArray();
     for (int n = 0; n < list.size(); n++) {
       Element el = (Element)list.get(n);
-      if (!(el instanceof InReplyTo)) {
+      if (!(el instanceof InReplyTo) && 
+          !(el instanceof Control)) {
         toJson(el,jstream);
         if (n < list.size()-1) jstream.writeSeparator();
       }



Mime
View raw message