Skip to content

Instantly share code, notes, and snippets.

@alexott
Created April 28, 2015 11:48
Show Gist options
  • Save alexott/c43a43851b08180d8909 to your computer and use it in GitHub Desktop.
Save alexott/c43a43851b08180d8909 to your computer and use it in GitHub Desktop.
Minimal test case reproducing Genson error
package test;
import com.owlike.genson.Genson;
import com.owlike.genson.GensonBuilder;
import java.util.HashMap;
import java.util.Map;
public class TestGenson {
static public void main(String[] args)
{
Genson genson = new GensonBuilder().setSkipNull(true).create();
Map<String, String> m = new HashMap<String,String>();
m.put("abcde", "normal");
m.put("fg\"hi", "with quote");
m.put("ij\\klmn", "with slash");
System.out.println("map='" + m + "'");
System.out.println("genson='" + genson.serialize(m) + "'");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment