-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
Binary data not recognized by YAML parser #39
Comments
Thank you for reporting this, providing examples. Note that Jackson databind does actually handle base64 encoding/decoding when using typed binding (to POJOS with |
As per this https://bitbucket.org/asomov/snakeyaml/src/tip/src/test/java/org/yaml/snakeyaml/types/BinaryTagTest.java?fileviewer=file-view-default test class snakeYAML is already supporting this. Jackson YAMLParser lack of this support. |
@arulrajnet Thank you for the link. This will be useful if and when someone has time to work on this. |
Unfortunately test case uses higher level method of snakeYAML ( |
Turns out there is simple class |
wow, yaml typing is evil and idiosyncratic. |
@earonesty Somehow it feels on-brand for YAML tho :-) |
There is no specification for the binary tag, no definition of encoding. Base64 is a convention tho, so using it is a safe choice. |
As per tests for #90, Jackson YAML format does actually support decoding from So even if YAML spec did not specify encoding, it should work in practice. |
Fails to recognise explicit binary type tag
!!binary
(tag:yaml.org,2002:binary
)Also fails to decode to spec as defined in http://yaml.org/type/binary.html.
Sample test case the demonstrates the issues:
From "Example 2.23. Various Explicit Tags" from spec (1.1 and 1.2) - http://www.yaml.org/spec/1.2/spec.html
The text was updated successfully, but these errors were encountered: