Skip to content
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

Is there any reason why lib depends on android-json? #99

Open
xp-vit opened this issue Mar 1, 2018 · 5 comments
Open

Is there any reason why lib depends on android-json? #99

xp-vit opened this issue Mar 1, 2018 · 5 comments

Comments

@xp-vit
Copy link

xp-vit commented Mar 1, 2018

Hi,
Thanks a lot for your library. I have following question:
Library has dependency:

com.vaadin.external.google
android-json
0.0.20131108.vaadin1

  1. Why do we support on android-json?
  2. Can we depend let's say on: compile group: 'org.json', name: 'json', last version ?

Thanks

@Stephan202
Copy link

@xp-vit, for context see #44 and #67. There's also #89. (This is mostly an FYI, I agree that the current state of affairs is annoying for projects that have strict classpath control.)

zregvart added a commit to zregvart/syndesis that referenced this issue Jan 28, 2020
JsonUnit seems to offer more functionality and nicer integration with
AssertJ, and it doesn't suffer from dependency issue[1] JSONassert does.

It is also currently maintained whereas JSONassert doesn't appear to be
so.

[1] skyscreamer/JSONassert#99
zregvart added a commit to zregvart/syndesis that referenced this issue Jan 28, 2020
JsonUnit provides nicer integration with AssertJ, doesn't have the
dependency issue[1] JSONAssert has, is maintained (JSONAssert doesn't
seem to be) and generates much nicer failure messages:

```
Different value found in node "spreadsheetId", expected: <"6364c6b9-ea7f-4caf-916b-3baeb6622c24x"> but was: <"6364c6b9-ea7f-4caf-916b-3baeb6622c24">.
```
or
```
Different keys found in node "", extra: "ID","SerialNumbers","Specification", expected: <{"Description":"New Monitor with Resolution 1920 x 1080 @ 60Hz","Name":"NEC Screen"}> but was: <{"Description":"New Monitor with Resolution 1920 x 1080 @ 60Hz","ID":4,"Name":"NEC Screen","SerialNumbers":[],"Specification":""}>

```

[1] skyscreamer/JSONassert#99
@jbotuck
Copy link

jbotuck commented May 16, 2023

org.json has now been moved to public domain. might be time to switch back

@antonmos
Copy link

This really threw me for a loop.
Our project uses org.json and for some reason it was not behaving correctly. Turns out that many of spring-boot libraries rely on json-assert so the very old version org.json.JSONObject from com.vaadin.external.google/android-json was took precedence. This kind of issues are hard to find, so it would be great to switch this library to use public org.json/json library

@antonmos
Copy link

@antonmos
Copy link

Looks like replacing it with com.github.openjson/openjson is even better, due to licensing issues https://stackoverflow.com/a/60952911/2748570

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants