-
Notifications
You must be signed in to change notification settings - Fork 61
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
feature: Encode nil map/slice with cbor empty map/list tag #351
Comments
@dedefer Thanks for opening issue and PR. It makes sense to me to add this option. I'll take a look at the PR. It may be a while because I need to update fuzz test, etc. first. |
@fxamacker Could you please give any updates on an issue? |
Hello @dedefer, I like your PR and want to include it in the next release. I've been swamped with work and hope to get to it after an upcoming deadline. I need to update the fuzzer for this PR and etc. so there's some extra work behind the scenes. You can specify unmerged PR's commit inside go.mod as a workaround before the PR is merged. Thanks again for the contribution and your patience! |
It's ok! I know that feel, bro. Thanks for not forgetting about this issue! I really appreciate your work! |
Is your feature request related to a problem? Please describe.
I use cbor as a serialization format for rpc between services written in different languages.
So when i try to send some structure like
I always need to initialize
Data
explicitlyExample{Data: map[string]string{}}
becauseExample{}
is serialized to{"data":null}
.So I need to describe this dto in python like
despite the fact that this field is required.
Describe the solution you'd like
I think it would be nice to have encoding option to enforce encoder use empty list/map cbor type for nil slice/map.
The text was updated successfully, but these errors were encountered: