Skip to content
This repository has been archived by the owner on Mar 25, 2024. It is now read-only.

support binary format of integers, e.g. 0b0101 #106

Merged
merged 1 commit into from Sep 25, 2018

Conversation

p4l1ly
Copy link

@p4l1ly p4l1ly commented Sep 24, 2018

No description provided.

@p4l1ly
Copy link
Author

p4l1ly commented Sep 24, 2018

related to (but still not solving) the issue #91

@p4l1ly
Copy link
Author

p4l1ly commented Sep 24, 2018

btw any plans to use the yaml-rust's function Yaml::from_str? so that one would not have to implement these things twice? see chyh1990/yaml-rust#114

Copy link
Owner

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see 0b in the yaml 1.2 spec http://yaml.org/spec/1.2/spec.html. Where is this behavior specified?

@p4l1ly
Copy link
Author

p4l1ly commented Sep 25, 2018

ok, now I can see it is not in the core schema, but in the YAML tag repository, which is referenced in the section 10.4.

The 0b format is however supported in some other yaml parsers, e.g. pyyaml. Maybe it could be a tiny reason for merging this?

Copy link
Owner

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I didn't look at the tag repository. I suppose that's good enough. Thanks!

@dtolnay dtolnay merged commit fedac77 into dtolnay:master Sep 25, 2018
@dtolnay
Copy link
Owner

dtolnay commented Oct 15, 2018

@p4l1ly please add the email address in https://github.com/p4l1ly/serde-yaml/commit/63eabe420d66418de51ff0225b711b14915d8feb.patch to your GitHub account if you would like this commit attributed to you. https://github.com/settings/emails

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants