I have following code:
package boonbug;
import io.advantageous.boon.json.*;
import java.io.*;
public class BoonBug {
public static void main(String[] args) throws IOException {
FileWriter pw = new FileWriter("test");
JsonFactory.create().writeValue(pw, "blah-blah");
pw.close();
}
}
It produces the test file that has "blah-blah" padded with NULLs. So the file size is 4kb.
This becomes problematic when I use it in a servlet returning JSON, Chrome/FF don't like it and report JSON parsing error.
Is it a bug? Am I doing something wrong?