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

Extend ':=' operator any type with a KeyEncoder instance #986

Merged

Conversation

tejinders
Copy link
Contributor

In the cases where JSON keys have a richer type
than plain strings, it is handy to have the ':='
operator work seamlessly. As circe already has
'KeyEncoder' abstraction, the assignment operator
can work off the same abstraction. This is also
backwards compatible with the 'String' based
implementation.

In the cases where JSON keys have a richer type
than plain strings, it is handy to have the ':='
operator work seamlessly. As circe already has
'KeyEncoder' abstraction, the assignment operator
can work off the same abstraction. This is also
backwards compatible with the 'String' based
implementation.
@tejinders tejinders force-pushed the misc/key-encoder-based-assignment-syntax branch from 9e692d6 to d400c3d Compare October 12, 2018 17:04
@codecov-io
Copy link

codecov-io commented Oct 12, 2018

Codecov Report

Merging #986 into master will increase coverage by 0.33%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #986      +/-   ##
==========================================
+ Coverage   85.18%   85.52%   +0.33%     
==========================================
  Files          75       75              
  Lines        2362     2362              
  Branches      159      159              
==========================================
+ Hits         2012     2020       +8     
+ Misses        350      342       -8
Impacted Files Coverage Δ
...hared/src/main/scala/io/circe/syntax/package.scala 100% <100%> (ø) ⬆️
...re/shared/src/main/scala/io/circe/KeyDecoder.scala 97.29% <0%> (-2.71%) ⬇️
.../core/shared/src/main/scala/io/circe/Decoder.scala 93.14% <0%> (+0.62%) ⬆️
...les/core/shared/src/main/scala/io/circe/Json.scala 79.48% <0%> (+0.64%) ⬆️
...rc/main/scala/io/circe/numbers/BiggerDecimal.scala 90.62% <0%> (+1.25%) ⬆️
...re/shared/src/main/scala/io/circe/JsonNumber.scala 92.3% <0%> (+1.28%) ⬆️
...d/src/main/scala/io/circe/NonEmptySeqDecoder.scala 100% <0%> (+8.33%) ⬆️
...rc/main/scala/io/circe/shapes/SizedInstances.scala 92.85% <0%> (+14.28%) ⬆️

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 127057d...d400c3d. Read the comment docs.

@travisbrown
Copy link
Member

@tejinders This is great, thanks (especially for the tests)!

@travisbrown travisbrown merged commit 83afcc5 into circe:master Oct 16, 2018
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

3 participants