abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pdk <pdks...@gmail.com>
Subject JSON Null Pointer Exception
Date Mon, 27 Oct 2008 20:49:49 GMT
I have an entry that has the following format:

<content type="text/xml" src="http://someurl/foo.xml" />

actual content is stored at some other URL.


In the JSON extension, when trying to write the entry with the above
content element, the JSONStream.writeQuoted method causes a null
pointer exception.

  public void writeQuoted(String value) throws IOException {
    writer.write('"');
    writer.write(escape(value));
    writer.write('"');
    writer.flush();
  }


  private static String escape(String value) {
    if (value == null) return null;
// snip

A snippet of the stack is (sorry had to retype b/c error is on a private system)

Writer.java:140
writeQuoted(JSONStream.java:116)
toJson(JSONUtil.java:166)
writeElement(JSONUtil.java:541)
toJson(JSONUtil.java:236)
writeList(JSONUtil.java:557)
toJson(JSONUtil.java:321)

Mime
View raw message