Comments (1)
Hi @davidjson9
This is actually the limitation of the current pyserde, because deserialization from {"a": 1}
goes successfully for both Alpha
and Bravo
.
In order to fix pyserde working properly for this case, we need to introduce the concept of External Tagging
which is described in Rust serde's documentation. pyserde's enum representation is Internal Tagging
.
I will take a look after flatten feature 👍
from pyserde.
Related Issues (20)
- Incorrect deserialization when deserializing a Union[list, object] HOT 3
- SerdeError: Unsupported type when subclass is member of dataclass HOT 2
- Bear type checking "leaks" to classes without the @serde decorator HOT 4
- Provide a way to disable `datetime` being converted to `str` HOT 6
- Custom Serializer doesn't work with top-level data.
- Can't infer serializer for PurePosixPath subclass since 0.14.2
- Top-level generic value does not deserialize correctly HOT 1
- Support for SQLAlchemy dataclass
- Performance becoming an issue HOT 11
- Feature request: support for RON (rusty object notation) HOT 1
- Code completion with jedi does not work / jediで`@serde`デコレーターを使用したデータクラスのインスタンスのフィールド・属性が補完されない HOT 5
- Multilingual support for pyserde guide HOT 1
- Japanese translation HOT 7
- Support numpy v2
- PEP 649 support
- jaxtyping numpy support HOT 3
- serde class decorator breaks forward reference resolution HOT 9
- dataclass InitVar plus explicit serde decorator breaks metadata and, at least, skip option HOT 3
- from_json raises exception trying to convert JSON to a dataclass with an InitVar
- Enum deserialization doesn't work with non-simple enum values HOT 4
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 pyserde.