On Wed, Jan 23, 2019 at 10:29 PM Torben Barsballe < tbarsba...@boundlessgeo.com> wrote:
> For completeness, we actually have a few more JSON libraries in > GeoTools/GeoServer in addition to what you listed: > > - Google GSON for MongoDB and ArcGIS REST (in GeoTools) and for WMS > TopoJSON format and the GeoGig community module (in GeoServer), which is > active. > - Jettison 1.0.1 (via XStream) for the JSON portion of the REST API > (Only in GeoServer). While the project is active, we're stuck on a 10-year > old version for backwards compatibility reasons. > > GSON is primarily intended for transforming Java to and from JSON , but it > does have minimal JsonPath > <https://google.github.io/gson/apidocs/com/google/gson/stream/JsonReader.html#getPath--> > support (With more robust integration added by the Jayway implementation > that you already mentioned). There's also a seemingly abandoned fork > <https://github.com/johnnylambada/gson/commit/344bd2fd4911146e761926d5ee1b441ba6bb9cfa> > that adds Json-Pointer support. > Overall, it seems like GSON doesn't quite have the capabilities you are > looking for, but it is already a dependency of some GeoTools modules so > maybe consider it? > I have no familiarity with it. Longer term, do you think it would be possible to rewrite the other modules with it? Would it be possible to ditch jackson where it's already used and use GSON instead, or in other words, does GSON have a low level API to build JSON? Does it have anything higher level like jackson-databind? What about the opposite (do everything that's done with gson using jackson instead?). Both libraries are well maintained and their core version is small enough, jackson at 300k, gson at 230kb. More generally, I'd definitely say go for a JSON library we already depend > upon (given that we have too many already), be it Jackson or something else. > I think it's reasonable to add Jackson to gt-main. > Jackson is the one I'm most familar with, but open learn the wonders of GSON, if someone can describe its vast superiority :-) > Having a JSON library as part of a core module might encourage others to > use it rather than adding their own (although I rather doubt it). > Hehe... obligatory XKCD mention here: https://imgs.xkcd.com/comics/standards.png Cheers Andrea == GeoServer Professional Services from the experts! Visit http://goo.gl/it488V for more information. == Ing. Andrea Aime @geowolf Technical Lead GeoSolutions S.A.S. Via di Montramito 3/A 55054 Massarosa (LU) phone: +39 0584 962313 fax: +39 0584 1660272 mob: +39 339 8844549 http://www.geo-solutions.it http://twitter.com/geosolutions_it ------------------------------------------------------- *Con riferimento alla normativa sul trattamento dei dati personali (Reg. UE 2016/679 - Regolamento generale sulla protezione dei dati “GDPR”), si precisa che ogni circostanza inerente alla presente email (il suo contenuto, gli eventuali allegati, etc.) è un dato la cui conoscenza è riservata al/i solo/i destinatario/i indicati dallo scrivente. Se il messaggio Le è giunto per errore, è tenuta/o a cancellarlo, ogni altra operazione è illecita. Le sarei comunque grato se potesse darmene notizia. This email is intended only for the person or entity to which it is addressed and may contain information that is privileged, confidential or otherwise protected from disclosure. We remind that - as provided by European Regulation 2016/679 “GDPR” - copying, dissemination or use of this e-mail or the information herein by anyone other than the intended recipient is prohibited. If you have received this email by mistake, please notify us immediately by telephone or e-mail.*
_______________________________________________ GeoTools-Devel mailing list GeoTools-Devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/geotools-devel