Comments (1)
Thanks for the PR but the party line from Serde has been that this decision should be made by the individual data types, not the serialization format (YAML, JSON, etc). If your data type should be represented as a string, that should be reflected in the Serialize/Deserialize impl for the type.
The issue of making it possible to derive Serialize/Deserialize for enums that are represented as strings is tracked at serde-rs/serde#251. Consider implementing #[serde(serialize_as_string)]
as suggested in that thread - we would welcome a serde PR.
from serde-yaml.
Related Issues (20)
- confusion around `Value::TaggedValue` and `is_null`
- [Bug] Failed to deserialize a enum inside a tagged enum.
- Recognizing more boolean representations HOT 4
- Strings that are commonly interpreted as booleans by other YAML parsers are not escaped
- Implement FromStr for Number HOT 1
- allow yes/no as boolean values HOT 1
- Feature Request: `yaml!()` macro similar to `serde_json::json!({})` HOT 2
- externally tagged enums not correctly parsed in 0.9.25 HOT 5
- "did not find expected node content" parse regression since 0.8
- #[serde(flatten)] disables treating an integer as a string
- Make Iterator implementation of Deserializer::from_reader lazy
- Fail to deserialize i128 in internally tagged enum HOT 1
- Deserialization using serde_yaml seems to be failing when it involves a nested struct
- [BUG] Tagged null at end of flow sequence gives scanner error
- Inconsistent Quoting Behavior in String Serialization HOT 2
- QUESTION: decoded from blank dictionary field
- Document the YAML specification version and schema
- Enhancement: Allow compact one-line representation of some fields HOT 1
- Yaml with colon at the beginning of a value won't parse
- Support for serialization/deserialization of nested enums HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from serde-yaml.