-
-
Notifications
You must be signed in to change notification settings - Fork 150
Allow overriding of file size limit for YAMLParser by exposing SnakeYAML LoaderOptions
#337
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
Comments
See my notes on #335: there will be need, likely, to carefully apply any new configurations so as to avoid having a hard limit on very recent SnakeYAML versions, assuming configurability will be added post-1.32 (which seems likely). |
@cowtowncoder probably best to revert the v2.13 branch to stick with snakeyaml 1.31 - with v2.14, I see YAMLParser has feature support but this is boolean - is there a preferred to set int properties? |
@pjfanning That might make sense (2.13). As to On Builder, further, it may get bit trickier with 2.x vs 3.0 since 2.x has no immutability requirement but 3.0 has. |
Added notes to the PR: my position now is that I kind of like exposing It will also be a problem for 2.x/3.0 migration, likely; may need to see how snakeyaml-engine deals with this. Seems likely there is a counterpart to this configuration object, and if so, it may be relatively easy to offer similar extension point. Put another way, I am ok with tighter bundling of SnakeYAML at least for Jackson 2.x. |
@cowtowncoder LoaderOptions seems to have been added to snakeyaml in v1.18 - methods have been added over time |
Ok, 1.18 sounds fine: Addition of methods sort of works well for us, as long as caller passes instance(s). |
LoaderOptions
@cowtowncoder I'm closing this because the changes were released with jackson v2.14.0. Feel free to reopen. |
Thank you @pjfanning -- yes, I had forgotten to close it. |
Since version 1.32 [1] SnakeYAML sets the limit for incoming data to 3MB. Since Jackson 2.14 [2] it is possible to override this default, so hardcode the limit to 1GB to allow parsing large ORT result files. [1]: https://bitbucket.org/snakeyaml/snakeyaml/wiki/Changes [2]: FasterXML/jackson-dataformats-text#337 Signed-off-by: Martin Nonnenmacher <[email protected]>
Since version 1.32 [1] SnakeYAML sets the limit for incoming data to 3MB. Since Jackson 2.14 [2] it is possible to override this default, so hardcode the limit to 1GB to allow parsing large ORT result files. [1]: https://bitbucket.org/snakeyaml/snakeyaml/wiki/Changes [2]: FasterXML/jackson-dataformats-text#337 Signed-off-by: Martin Nonnenmacher <[email protected]>
Relates to #335 (comment)
snakeyaml 1.32 brings in a default limit of 3Mb when parsing yaml files.
Need to allow users to specify another value if they need to.
https://bitbucket.org/snakeyaml/snakeyaml/src/72dfa9f1074abe2b8a6c8776bee4476b0aed02e3/src/main/java/org/yaml/snakeyaml/LoaderOptions.java
The text was updated successfully, but these errors were encountered: