-
Notifications
You must be signed in to change notification settings - Fork 78
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
Add serde
support for cxx-qt-lib using #[serde(into=...,from=...)]
#943
Comments
I think the question for some of them is what JSON format should we use, as eg QJsonValue doesn't have an implementation for QPoint, so should we just |
The exact output format is decided by the serializer, which is unrelated to JSON, but the question remains what types to convert to which native Rust types. In the case of QPoint, we can actually just use In the case of JSON, this would result in |
Right, I guess it's things like color which can be tricky and things where even the Qt internals aren't consistent like QRect vs QRectF. |
See also: #943 Co-authored-by: Montel Laurent <[email protected]>
We should probably add support to QByteArray as well. |
Serde supports automatically converting types after/before (de-)serialization to a proxy type.
This way, we could more easily support Serde in cxx-qt-lib, after our previous failed attempts in #425 .
It would be somewhat less optimal, as e.g. serializing a QString would mean a conversion to/from String, but still better than not supporting it.
@Montel does this sound like a feature you'd be interested in adding?
The text was updated successfully, but these errors were encountered: