I’m using gson 1.7 and i see that it has a serialized block in toJson()
in class
final class ParameterizedTypeHandlerMap<T>{
....
public synchronized T getHandlerFor(Type type) {
....
If I’m creating the object per each request it also has a synchronized block in construction.
I have couple questions:
- Does 2.1 version has the same behaver?
- Is it safe (in perspective to backward compatibility) to upgrade to 2.1
- What is best performance package for json?
I use gson 2 and it works same as 1.7 for me. You can create an instance of Gson per your Thread if synchronized scare you.