able to change gson settings.
portlek opened this issue ยท 6 comments
Uhm, I'm not sure about keeping the current 2 gson methods in the code, since most people just misuse them. Since they just call the setString method, if you need any customization for Gson, best case just implement that yourself.
nbt.setObject("foo", new Object());
is equivalent to nbt.setString("foo", gson.toJson(new Object());
What kind of change of you have in mind?
Like I said, currently more considering removing the entire GsonWrapper instead of extending it. Do you try to add adapters to the gson instance?
Since the entire gson thing is a one line thing, either write a custom writer/loader around your class(planning for 3.0 to make that simpler) or throw your class into gson/jackson/whatever and set the string into the nbt. Just a small thing, I think having formatting with newlines enabled might not be the best idea, since that just adds extra bytes and noise.