Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Recursive json serialization for structured attributes (log.Any) #50

Merged
merged 6 commits into from
Nov 20, 2023

Conversation

ldemailly
Copy link
Member

@ldemailly ldemailly commented Oct 22, 2023

Recursive json serialization for structured attributes (log.Any) and also:

  • Handles both errors with exported struct fields (as sub objects) and the ones who do not (calling .Error() to get the JSON string)
  • Correctly handles nil as JSON null

Of note: performance is somewhat worse

@codecov
Copy link

codecov bot commented Oct 22, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (52498c7) 100.00% compared to head (ac8c689) 100.00%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #50   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            4         4           
  Lines          449       430   -19     
=========================================
- Hits           449       430   -19     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ldemailly ldemailly mentioned this pull request Nov 16, 2023
@ldemailly ldemailly changed the title recursive json serialization for Any Recursive json serialization for structured attributes (log.Any) Nov 20, 2023
@ldemailly ldemailly merged commit 71b9af3 into main Nov 20, 2023
@ldemailly ldemailly deleted the recurs_json branch November 20, 2023 22:40
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant