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

fix nil attachment on stream in custom encoder on sorted map #423

Merged
merged 1 commit into from Dec 21, 2019

Conversation

vano144
Copy link
Contributor

@vano144 vano144 commented Nov 28, 2019

Hello, thank you for a library !

This pr fixes next problem:

  1. We create jsoniter.Stream with SortMapKeys enable
  2. Pass attachment to created stream
  3. Try to serialize map with custom types
  4. Attachment will be null on stream in Encode method

Example in test - Test_custom_encoder_attachment

@codecov
Copy link

codecov bot commented Nov 28, 2019

Codecov Report

Merging #423 into master will increase coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #423      +/-   ##
==========================================
+ Coverage   86.46%   86.46%   +<.01%     
==========================================
  Files          41       41              
  Lines        5105     5107       +2     
==========================================
+ Hits         4414     4416       +2     
  Misses        555      555              
  Partials      136      136
Impacted Files Coverage Δ
reflect_struct_encoder.go 89.07% <100%> (+0.09%) ⬆️
reflect_map.go 87.74% <100%> (+0.06%) ⬆️
reflect_struct_decoder.go 81.35% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44a7e73...aba8654. Read the comment docs.

@taowen taowen merged commit e88512f into json-iterator:master Dec 21, 2019
zhenzou pushed a commit to zhenzou/jsoniter that referenced this pull request Feb 2, 2022
…stream

fix nil attachment on stream in custom encoder on sorted map
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants