Created
April 28, 2015 11:48
-
-
Save alexott/c43a43851b08180d8909 to your computer and use it in GitHub Desktop.
Minimal test case reproducing Genson error
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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