Skip to content

Instantly share code, notes, and snippets.

@ajduke

ajduke/E1.java

Last active Jan 2, 2016
Embed
What would you like to do?
public class Example34 {
public static void main(String[] args) {
String str ="<myval>";
Gson gson = new Gson();
System.out.println("Normal behaviour...");
System.out.println(gson.toJson(str));
System.out.println("\nDisabled html escaping...");
gson = new GsonBuilder().disableHtmlEscaping().create();
System.out.println(gson.toJson(str));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.