-
-
Notifications
You must be signed in to change notification settings - Fork 74
[feature] allow user custom max depth #155
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package net.minidev.json.parser; | ||
|
||
/* | ||
* Copyright 2011-2023 JSON-SMART authors | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
public class ParserOptions { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. adding a flag to remove the limit can be enough? adding and extra ParserOptions only for that, is... overkill ? and this PR looks not to use maxDepth. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @UrielCh Yes, as I said before, it's only a draft about external API changes. |
||
|
||
private int maxDepth; | ||
|
||
public ParserOptions() { | ||
} | ||
|
||
public int getMaxDepth() { | ||
return maxDepth; | ||
} | ||
|
||
public void setMaxDepth(int maxDepth) { | ||
this.maxDepth = maxDepth; | ||
} | ||
} |
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.
my screen is not large enough to read this line ...
may I get a human translation for this change?
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.
@UrielCh It's a style miss change. I will revert it.