Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can you avoid Gson converting "<" and ">" into unicode escape sequences?

Tags:

java

json

gson

People also ask

Is GSON a Threadsafe?

Gson instances are Thread-safe so you can reuse them freely across multiple threads. You can create a Gson instance by invoking new Gson() if the default configuration is all you need.

What does GSON to JSON do?

Gson (by Google) is a Java library that can be used to convert a Java object into JSON string. Also, it can used to convert the JSON string into equivalent java object.

Why do we use GSON?

GSON has been successfully used in several android apps that are in Google Play today. The benefit you get with GSON is that object mapping can save the time spent writing code.


You need to disable HTML escaping.

Gson gson = new GsonBuilder().disableHtmlEscaping().create();