-
Notifications
You must be signed in to change notification settings - Fork 198
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
Recommend upgrading to the real org.json #179
Comments
I agree, for example the original version is vulnerable, see https://nvd.nist.gov/vuln/detail/CVE-2023-5072 |
Context:currently skyscreamer/JSONassert uses the vaadin implementation of org.json: Lines 52 to 56 in 7414e90
Suggestion:Use Open Json. Instead of using org.json aka stleary/JSON-java, I suggest to switch to the Open Json reimplementation, because it has an Apache-2.0 license. Open-Json is based on the original vaadin implementation (which was a reimplementation of stleary/JSON-java). Background:Developers are fleeing from stleary/JSON-java because of its non-OSI-license. The JSON license was replaced by a even less specific "Public domain" license in 2022, leaving even more room for interpretation on what this license implies (at least for corporate lawyers... for developers it is likely more than clear). See also:
and
The "problem" is that some developers work in a corporate context and thus cannot use software/libraries that are licensed in an ..let's say "informal" way. Since skyscreamer/JSONassert is even used by Spring Framework, this affects thousands of developers and software projects because @spring-projects' spring-framework and spring-boot are widely spread in commercial and non-commercial software products. |
I haven't done a new version in a few years, so this will take some time to get the pom.xml modernized. The org.json update will need to be a new minor version at least since it will change how nulls are handled. I'll probably get a 1.5.2 out first to deal with some immediate problems, and then try to fast follow on 1.6.0. This is not a commercial effort, so I don't have an ETA. However, I will post updates. |
Any more thoughts on org.json vs openjson? org.json is backward breaking in terms of null handling and may require a major update. If openjson does not break the tests, then we could probably release with just a minor bump. Regardless, it's high time to get off the ancient vaadin library. |
Oh, openjson uses different packages. It's perhaps even more backward breaking. If we were to use org.json, what would be the best version to put in the maven dependency to be as friendly to as many projects as possible? @stleary opinions appreciated. |
@carterpage I would recommend the org.json latest release: 20240303. |
Is this a problem? I see two options:
However, following the closing comment in the issue here I don't think we can expect a change in the license of org.json, as the maintainers do not see a need to change or don't want to acknowledge the problem users are facing with the current license type:
So maybe JSONassert should just follow the maintainer's advice and do not use org.json:
However, also OpenJson might have drawbacks (how high is the adoption? is there just one maintainer? how often will new (maintenance) release versions be published? etc. ) (Unfortunately) software development is not only about code, but also about legal requirements. |
@stleary Briefly, can you please help me understand why 20231013 wouldn't be a safer bet?
I notice json-java is using a much older version of json-path (upgraded from 2.1 to 2.4 in 20240205), so I'm wondering if latest/greatest is ideal for a low level library. |
@stleary Thanks for the recommendation. This will use the new library in the next version. @fkriegl Thanks for your suggestion. I have opted to use org.json because it is the most widely used JSON library. I am not a lawyer, but plenty of companies with their own lawyers (e.g. Google) seem comfortable with including it in their own open source libraries so that's good enough for me. Feel free to fork JSONAssert to create a version that supports Open JSON! |
org.json now has a public domain license. The latest version is more capable and contains many bug fixes not found in the Android version. Also, you could use similar() for strict comparisons.
The text was updated successfully, but these errors were encountered: