Skip to content
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

Stdlib: add supports for encoding/json #45

Closed
xhd2015 opened this issue Apr 9, 2024 · 0 comments
Closed

Stdlib: add supports for encoding/json #45

xhd2015 opened this issue Apr 9, 2024 · 0 comments
Labels
trace the trace package

Comments

@xhd2015
Copy link
Owner

xhd2015 commented Apr 9, 2024

Specifically, the json.newTypeEncoder. When it returns unsupported function, we can just silently ignore that field.

Here is an example when trying to marshal a stack trace with cancelFunc unmarshalable:

error:json: error calling MarshalJSON for type *sorted_map.SortedMap: json: error calling MarshalJSON for type *sorted_map.SortedMap: json: error calling MarshalJSON for type *sorted_map.SortedMap: json: error calling MarshalJSON for type *sorted_map.SortedMap: json: error calling MarshalJSON for type trap.object: field _r1: json: unsupported type: context.CancelFunc
xhd2015 added a commit that referenced this issue Apr 10, 2024
xhd2015 added a commit that referenced this issue Apr 10, 2024
xhd2015 added a commit that referenced this issue Apr 10, 2024
xhd2015 added a commit that referenced this issue Apr 10, 2024
@xhd2015 xhd2015 closed this as completed Apr 10, 2024
@xhd2015 xhd2015 added the trace the trace package label Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
trace the trace package
Projects
None yet
Development

No branches or pull requests

1 participant