Replies: 1 comment 10 replies
-
|
@stephenberry I've tried to understand the problem a bit better. When running my code in question I can see that the serializer calls the custom writer from the branch where I can't (want to) make my wrapper optional because it would make the API of my data classes quite clunky. Instead I was thinking if it would be possible to introduce a setting in the glz::meta<> where the user could specify some of the Do you thinks that this could be a solution for the problem? thx Michi |
Beta Was this translation helpful? Give feedback.
10 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I have the following code
struct Ahas a custom serializer that extracts the value ofA::i, so the result should look like thisSo far so good, this is working. But when
A::ihas no value I want the entry to be skipped, so I'm using.skip_null_members = 1as an option to the write method. However, I always end up getting an entry with a 'null' value.I know the problem comes from the combination of those 2 objects. Is there a way to eliminate empty values right in the custom serializers?
thx Michi
Beta Was this translation helpful? Give feedback.
All reactions