You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@abdera.apache.org by jm...@apache.org on 2008/02/03 02:53:34 UTC
svn commit: r617939 -
/incubator/abdera/java/trunk/extensions/json/src/main/java/org/apache/abdera/ext/json/JSONUtil.java
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();
}