Skip to content
This repository has been archived by the owner on Dec 1, 2023. It is now read-only.

YAML support #100

Closed
gbersac opened this issue Apr 24, 2015 · 3 comments
Closed

YAML support #100

gbersac opened this issue Apr 24, 2015 · 3 comments

Comments

@gbersac
Copy link

gbersac commented Apr 24, 2015

Yaml is a very popular and I am sure a lot of rustacean will use it. There is already one library implementing it, but, even though it is probably very efficient, it is a c wrapper and it would be great to have one library taking care of the serialization for all the most popular languages.

Since json is a subset of yaml, there could even be an interface for both, making it easy to translate from one to another. Xml could be added as I explained in another issue.

let data1 = xml::from_string(xml_string); // return a Node structure
let data2 = yaml::from_string(yaml_string); // also return a Node structure
let data3 = json.from_string(json_string); // also return a Node structure

Tell me if you are interested in implementing that feature, that's a topic I am eager to work on.

@alexcrichton
Copy link
Contributor

This would be awesome! I suspect it would not be a part of this library, however, but rather done as an external crate.

@gbersac
Copy link
Author

gbersac commented Apr 24, 2015

I am not interested in making another library. I prefer upgrading a great library than creating a mediocre on my own.

If I create a yaml parser which is an equivalent of your json parser, would you consider merging it ? Since I am not an expert, I'll probably need some help.

@alexcrichton
Copy link
Contributor

Right now we're not looking to expand this library too much as we hope to deprecated it one day (fingers crossed!). With crates.io and Rust traits, however, it's super easy to make a high-quality library externally, and it also keeps the compile times down for everyone using rustc-serialize who doesn't require YAML encoding/decoding. An example of a library like this is toml

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

No branches or pull requests

2 participants