primefaces-extensions / primefaces-extensions.github.com

Organization repo, only for homepage, wiki and issue tracker
https://primefaces-extensions.github.io/
70 stars 22 forks source link

GSON: Make optional dependency #803

Closed tandraschko closed 4 years ago

tandraschko commented 4 years ago

Currently if you add pfe, you always get GSON as dependency. Actually its only used for some component and should be optional. We should try to use PF JSON or JSONB

tandraschko commented 4 years ago

switched the fuzzySearchRendererd to PF JSON. Dont time for now to further work on it. If someone has time, feel free... :D

melloware commented 4 years ago

I will work on it.

melloware commented 4 years ago

OK I have made all the changes and marked GSON as optional=true dependency. its only used in 3 components JsonConverter, Layout, and GChart.

I will update the release notes to reflect this but now PF Extensions successfully has no dependencies just like PF and I was able to deploy a PrimeFaces test app successfully proving it.

tandraschko commented 4 years ago

is it to much work for the other components to switch?

melloware commented 4 years ago

Well it seems they re using GSON specific features such as Date Conversion to a certain format and something called GSonTree which doesn't translate 1-1 with JSONObject. So we would probably have to re-engineeer all of them to have custom objects to serialize.

But the whole point of JSonConverter used in pe:remoteCommand was to be generic and deserialize anything.