-
-
Notifications
You must be signed in to change notification settings - Fork 68
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
add flag to drop the limit of json depth #156
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the default parser flag should be 0
the limit should be enabled by default.
the flag name should be called:
UNLIMITED_JSON_DEPTH and do the opposite.
} | ||
String s = sb.toString(); | ||
try { | ||
JSONParser parser = new JSONParser(DEFAULT_PERMISSIVE_MODE & ~JSONParser.FINITE_JSON_DEPTH); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why FINITE_JSON_DEPTH
could not benefit of an import static wherever DEFAULT_PERMISSIVE_MODE
can.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DEFAULT_PERMISSIVE_MODE & ~FINITE_JSON_DEPTH
?
should be:
DEFAULT_PERMISSIVE_MODE | FINITE_JSON_DEPTH
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not remember this code, but I think that the default parser value is 0
...
So the issue is that the flag should be call UNLIMITED_JSON_DEPTH and do the opposite.
The limit is enabled by default for now, and can be disabled in some rare cases.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to the fixed version should be: DEFAULT_PERMISSIVE_MODE | UNLIMITED_JSON_DEPTH
after reading the code: /**
* smart mode, fastest parsing mode. accept lots of non standard json syntax
*
* @since 1.0.6
*/
public final static int MODE_PERMISSIVE = -1; The MODE_PERMISSIVE is the mode I use by default for my stuff.
what... what is the default mode ? |
I remember my way of codding. |
@UrielCh I agree with that the limited ability should be enabled by default. But the default value is -1, not 0. |
Change the since. bump minor or patch ? |
so the next version is V 2.5.0 |
@UrielCh I have done bump the minor versions. But I think we can't avoid using |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [net.minidev:json-smart](https://urielch.github.io/) ([source](https://github.com/netplex/json-smart-v2)) | `2.4.10` -> `2.5.1` | [![age](https://developer.mend.io/api/mc/badges/age/maven/net.minidev:json-smart/2.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/maven/net.minidev:json-smart/2.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/maven/net.minidev:json-smart/2.4.10/2.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/maven/net.minidev:json-smart/2.4.10/2.5.1?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- > [!WARNING] > Some dependencies could not be looked up. Check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>netplex/json-smart-v2 (net.minidev:json-smart)</summary> ### [`v2.5.1`](https://github.com/netplex/json-smart-v2/releases/tag/2.5.1): V 2.5.1 [Compare Source](https://github.com/netplex/json-smart-v2/compare/2.5.0...2.5.1) #### What's Changed - Bump junit.version from 5.9.3 to 5.10.0 in /json-smart by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/158](https://github.com/netplex/json-smart-v2/pull/158) - Bump junit.version from 5.9.3 to 5.10.0 in /json-smart-action by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/157](https://github.com/netplex/json-smart-v2/pull/157) - Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.5.0 to 3.6.2 in /json-smart by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/166](https://github.com/netplex/json-smart-v2/pull/166) - Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.5.0 to 3.6.2 in /json-smart-action by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/165](https://github.com/netplex/json-smart-v2/pull/165) - Bump junit.version from 5.10.0 to 5.10.1 in /json-smart-action by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/164](https://github.com/netplex/json-smart-v2/pull/164) - Bump junit.version from 5.10.0 to 5.10.1 in /json-smart by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/163](https://github.com/netplex/json-smart-v2/pull/163) - chore: Update github id from Shoothzj to shoothzj by [@​shoothzj](https://github.com/shoothzj) in [https://github.com/netplex/json-smart-v2/pull/168](https://github.com/netplex/json-smart-v2/pull/168) - Bump asm version from 9.3 to 9.6 by [@​shoothzj](https://github.com/shoothzj) in [https://github.com/netplex/json-smart-v2/pull/167](https://github.com/netplex/json-smart-v2/pull/167) - Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.6.2 to 3.6.3 in /json-smart-action by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/169](https://github.com/netplex/json-smart-v2/pull/169) - Bump org.apache.maven.plugins:maven-javadoc-plugin from 3.6.2 to 3.6.3 in /json-smart by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/170](https://github.com/netplex/json-smart-v2/pull/170) - Bump org.apache.maven.plugins:maven-compiler-plugin from 3.11.0 to 3.12.0 in /json-smart by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/172](https://github.com/netplex/json-smart-v2/pull/172) - Bump org.apache.maven.plugins:maven-compiler-plugin from 3.11.0 to 3.12.0 in /json-smart-action by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/171](https://github.com/netplex/json-smart-v2/pull/171) - Bump org.apache.maven.plugins:maven-compiler-plugin from 3.12.0 to 3.12.1 in /json-smart by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/174](https://github.com/netplex/json-smart-v2/pull/174) - Bump org.apache.maven.plugins:maven-compiler-plugin from 3.12.0 to 3.12.1 in /json-smart-action by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/173](https://github.com/netplex/json-smart-v2/pull/173) - Fix OSGi import package version for net.minidev.asm. by [@​msqr](https://github.com/msqr) in [https://github.com/netplex/json-smart-v2/pull/180](https://github.com/netplex/json-smart-v2/pull/180) - Bump junit.version from 5.10.1 to 5.10.2 in /json-smart-action by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/179](https://github.com/netplex/json-smart-v2/pull/179) - Bump junit.version from 5.10.1 to 5.10.2 in /json-smart by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/178](https://github.com/netplex/json-smart-v2/pull/178) - Bump version from 2.5.0 to 2.5.1 by [@​shoothzj](https://github.com/shoothzj) in [https://github.com/netplex/json-smart-v2/pull/181](https://github.com/netplex/json-smart-v2/pull/181) - docs: add change log for version 2.5.1 by [@​shoothzj](https://github.com/shoothzj) in [https://github.com/netplex/json-smart-v2/pull/182](https://github.com/netplex/json-smart-v2/pull/182) - Update 2024 by [@​UrielCh](https://github.com/UrielCh) in [https://github.com/netplex/json-smart-v2/pull/183](https://github.com/netplex/json-smart-v2/pull/183) - add somme doc to remove deployement warnings by [@​UrielCh](https://github.com/UrielCh) in [https://github.com/netplex/json-smart-v2/pull/184](https://github.com/netplex/json-smart-v2/pull/184) #### New Contributors - [@​msqr](https://github.com/msqr) made their first contribution in [https://github.com/netplex/json-smart-v2/pull/180](https://github.com/netplex/json-smart-v2/pull/180) **Full Changelog**: netplex/json-smart-v2@2.5.0...2.5.1 ### [`v2.5.0`](https://github.com/netplex/json-smart-v2/releases/tag/2.5.0): V 2.5.0 [Compare Source](https://github.com/netplex/json-smart-v2/compare/2.4.11...2.5.0) #### What's Changed - Bump maven-bundle-plugin from 5.1.8 to 5.1.9 in /json-smart-action by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/148](https://github.com/netplex/json-smart-v2/pull/148) - Bump maven-bundle-plugin from 5.1.8 to 5.1.9 in /json-smart by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/149](https://github.com/netplex/json-smart-v2/pull/149) - Bump maven-source-plugin from 3.2.1 to 3.3.0 in /json-smart by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/151](https://github.com/netplex/json-smart-v2/pull/151) - Bump maven-source-plugin from 3.2.1 to 3.3.0 in /json-smart-action by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/150](https://github.com/netplex/json-smart-v2/pull/150) - Bump maven-release-plugin from 3.0.0 to 3.0.1 in /json-smart-action by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/152](https://github.com/netplex/json-smart-v2/pull/152) - Bump maven-release-plugin from 3.0.0 to 3.0.1 in /json-smart by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/153](https://github.com/netplex/json-smart-v2/pull/153) - add flag to drop the limit of json depth by [@​Shoothzj](https://github.com/Shoothzj) in [https://github.com/netplex/json-smart-v2/pull/156](https://github.com/netplex/json-smart-v2/pull/156) **Full Changelog**: netplex/json-smart-v2@2.4.11...2.5.0 ### [`v2.4.11`](https://github.com/netplex/json-smart-v2/releases/tag/2.4.11): V 2.4.11 [Compare Source](https://github.com/netplex/json-smart-v2/compare/2.4.10...2.4.11) ##### *V 2.4.11* (2023-05-18) - Fix error in isWritable in accessor-smart. [PR 147](https://github.com/netplex/json-smart-v2/pull/147) - Update json-smart dependency to use accessor-smart:2.4.11 #### What's Changed - Bump maven-release-plugin from 3.0.0-M7 to 3.0.0 in /json-smart-action by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/135](https://github.com/netplex/json-smart-v2/pull/135) - Bump maven-release-plugin from 3.0.0-M7 to 3.0.0 in /json-smart by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/136](https://github.com/netplex/json-smart-v2/pull/136) - Bump maven-resources-plugin from 3.3.0 to 3.3.1 in /json-smart by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/138](https://github.com/netplex/json-smart-v2/pull/138) - Bump maven-resources-plugin from 3.3.0 to 3.3.1 in /json-smart-action by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/139](https://github.com/netplex/json-smart-v2/pull/139) - Fix the grammar in the Readme by [@​wirelessben](https://github.com/wirelessben) in [https://github.com/netplex/json-smart-v2/pull/140](https://github.com/netplex/json-smart-v2/pull/140) - Bump junit.version from 5.9.2 to 5.9.3 in /json-smart-action by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/144](https://github.com/netplex/json-smart-v2/pull/144) - Bump junit.version from 5.9.2 to 5.9.3 in /json-smart by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/143](https://github.com/netplex/json-smart-v2/pull/143) - Fix CVE from being reported against accessors-smart by [@​Grimoren](https://github.com/Grimoren) in [https://github.com/netplex/json-smart-v2/pull/142](https://github.com/netplex/json-smart-v2/pull/142) - Bump maven-gpg-plugin from 3.0.1 to 3.1.0 in /json-smart-action by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/146](https://github.com/netplex/json-smart-v2/pull/146) - Bump maven-gpg-plugin from 3.0.1 to 3.1.0 in /json-smart by [@​dependabot](https://github.com/dependabot) in [https://github.com/netplex/json-smart-v2/pull/145](https://github.com/netplex/json-smart-v2/pull/145) - Fix isWritable method by [@​harikrishna553](https://github.com/harikrishna553) in [https://github.com/netplex/json-smart-v2/pull/147](https://github.com/netplex/json-smart-v2/pull/147) #### New Contributors - [@​wirelessben](https://github.com/wirelessben) made their first contribution in [https://github.com/netplex/json-smart-v2/pull/140](https://github.com/netplex/json-smart-v2/pull/140) - [@​Grimoren](https://github.com/Grimoren) made their first contribution in [https://github.com/netplex/json-smart-v2/pull/142](https://github.com/netplex/json-smart-v2/pull/142) - [@​harikrishna553](https://github.com/harikrishna553) made their first contribution in [https://github.com/netplex/json-smart-v2/pull/147](https://github.com/netplex/json-smart-v2/pull/147) **Full Changelog**: netplex/json-smart-v2@2.4.10...2.4.11 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 10pm every weekday,before 6am every weekday" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/camunda/zeebe). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->
No description provided.