abdera-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Calavera" <david.calav...@gmail.com>
Subject Re: JSON Null Pointer Exception
Date Sat, 01 Nov 2008 06:10:46 GMT
Philip, could you open a ticket in our jira including the full stacktrace?
I'll take a look when I'll go back home.
Thank you.

On Mon, Oct 27, 2008 at 9:49 PM, pdk <pdkspam@gmail.com> wrote:

> 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)
>



-- 
David Calavera
http://www.thinkincode.net

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message