Java-Gaming.org Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (807)
Games in Android Showcase (239)
games submitted by our members
Games in WIP (872)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  is there a preferred JSON library?  (Read 760 times)
0 Members and 1 Guest are viewing this topic.
Offline philfrei
« Posted 2020-04-10 15:15:48 »

I was thinking I'd use JSON instead of XML for save/load of files for a project.

I see that there are many implementations. The article Introducing JSON at json.org has an index at the end with many links.

Any suggestions as to how to go about choosing one?

stleary/JSON-java has 3.5K stars on github and is the first one listed.
Apache's Johnzon looks very powerful.
Is this from Oracle?

There are also what look like simpler versions. I don't know that I can anticipate all the ways I will want to use it going forward. I kind of like the idea of keeping an eye out for interacting with the web in some fashion.

But I'm also tempted to just keep using XML, too. So what if the save/load files are a little more verbose: the XML functionality is built in which makes packaging easier.

music and music apps: http://adonax.com
Offline abcdef
« Reply #1 - Posted 2020-04-10 15:48:35 »

Jackson is pretty good

https://github.com/FasterXML/jackson
Offline gouessej
« Reply #2 - Posted 2020-04-10 21:37:56 »

Hello

I use JSON-P and I plan to give a try to JSON-B. This library is already part of JavaEE / JakartaEE, its reference implementation is used in Glassfish. Anyway, Apache Johnzon has an implementation of the same API:
https://www.eclipse.org/community/eclipse_newsletter/2018/november/jsonjakartaee.php

Jackson has the reputation of being faster but the last time I looked at it, it had a lack of modularity, i.e it wasn't possible to get JSON support without XML support when using Maven. It has an implementation of the same JSR but it's unmaintained:
https://github.com/pgelinas/jackson-javax-json

Julien Gouesse | Personal blog | Website | Jogamp
Pages: [1]
  ignore  |  Print  
 
 

 
Riven (843 views)
2019-09-04 15:33:17

hadezbladez (5778 views)
2018-11-16 13:46:03

hadezbladez (2597 views)
2018-11-16 13:41:33

hadezbladez (6195 views)
2018-11-16 13:35:35

hadezbladez (1494 views)
2018-11-16 13:32:03

EgonOlsen (4729 views)
2018-06-10 19:43:48

EgonOlsen (5779 views)
2018-06-10 19:43:44

EgonOlsen (3270 views)
2018-06-10 19:43:20

DesertCoockie (4171 views)
2018-05-13 18:23:11

nelsongames (5481 views)
2018-04-24 18:15:36
A NON-ideal modular configuration for Eclipse with JavaFX
by philfrei
2019-12-19 19:35:12

Java Gaming Resources
by philfrei
2019-05-14 16:15:13

Deployment and Packaging
by philfrei
2019-05-08 15:15:36

Deployment and Packaging
by philfrei
2019-05-08 15:13:34

Deployment and Packaging
by philfrei
2019-02-17 20:25:53

Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!