-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
org.json should not be used - Update unirest library to new version #3703
Comments
I would prefer gson, I use that in share latex and we already have guava as deps |
Is it this library?! https://github.com/stleary/JSON-java We could make a PR there, if you want to. |
https://github.com/openjson/openjson seems to be most modern drop-in alternative. |
The reason I prefer gson over the standard json is because it directly supports generics and allows to have a clear hierarchy (all classes are dervied from JsonElement - such kind of structure does not exist in org.json/openjson) and you can always chain methods, e.g. getAsJsonArray().get(0).getAsInt() |
@Siedlerchr Feel free to rewrite the code of JabRef to use gson instead of |
The dependency comes from UniRest. http://unirest.io/java.html |
Yeah - this is the way to go! Side story: I tried to replace the dependency by openjson during the gradle build. However, they changed the package name to |
I currently try to use it with gson. It works in general, but is has the disadvantage against the openJson implementation that it does not have these pseudo-optional methods: |
So the only reason why we have to rewrite everything JSON and unirest-related is because of a single stupid line in a license file? Can we not just ignore this as we have done so far? |
Yes, because we want to keep JabRef distributed in Linux distributions. Otherwise, JabRef is not open source and free software.
Source: https://wiki.debian.org/qa.debian.org/jsonevil +1 for devcall. |
Which binary of jabref introduced the non free library first? We have to adjust the license settings in distributions. Please update the wrong LICENSE file according to the real license until it is fixed. |
@jonasstein It was an external dependency. See above. |
@Siedlerchr Excuse me, if I misunderstand your reply. As far I could see you provide a jabref JAR which includes the non free org.json library. |
Refs Kong/unirest-java#176. |
OK HTTP seems to be the recent "cool" http client: https://square.github.io/okhttp/ Other alternatives: https://github.com/eclipse/microprofile-rest-client#implementations Indepenent of what we do, we need anADR |
@koppor Kong/unirest-java#176 is resolved and allows use of gson instead of org.json. |
As unirest now has removed org.json it should be safe to upgrade to the newest version. |
@Siedlerchr Could you provide more details (from which name to which name) or just replace the dependency and make a PR? 😇 |
I will try to look into it, if no one else is interested. Could be a good first issue. See the Upgrade guide: https://github.com/Kong/unirest-java/blob/master/UPGRADE_GUIDE.md
|
resolves JabRef#3703 [dependency fix in unirest](Kong/unirest-java#311)
resolves JabRef#3703 [dependency fix in unirest](Kong/unirest-java#311)
resolves JabRef#3703 [dependency fix in unirest](Kong/unirest-java#311)
resolves JabRef#3703 [dependency fix in unirest](Kong/unirest-java#311)
Thanks to @JoHaHu this issue is now resolved. |
org.json is non-free software: https://wiki.debian.org/qa.debian.org/jsonevil
Jackson is the way to go.
The text was updated successfully, but these errors were encountered: