Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@sergeykolbasov
Copy link
Contributor

@sergeykolbasov sergeykolbasov commented Jan 31, 2021

It's similar to Json.map* transformations but with a drop of F[_] : Applicative

We mangle a lot with JSON AST, often in some monadic context. This collection of methods would come in handy.

@codecov-io
Copy link

codecov-io commented Jan 31, 2021

Codecov Report

Merging #1648 (66477cf) into master (2463517) will decrease coverage by 1.09%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1648      +/-   ##
==========================================
- Coverage   86.13%   85.03%   -1.10%     
==========================================
  Files          61       61              
  Lines        2423     2453      +30     
  Branches      138      145       +7     
==========================================
- Hits         2087     2086       -1     
- Misses        336      367      +31     
Impacted Files Coverage Δ
...les/core/shared/src/main/scala/io/circe/Json.scala 69.85% <0.00%> (-11.71%) ⬇️
.../core/shared/src/main/scala/io/circe/Decoder.scala 85.63% <0.00%> (-0.27%) ⬇️
...rc/main/scala/io/circe/numbers/BiggerDecimal.scala 87.71% <0.00%> (ø)

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 2463517...66477cf. Read the comment docs.

@zarthross
Copy link
Member

Thanks for the PR. Love the idea. What do you think of changing the signature though to be a little more flexible.

From:
def traverseBoolean[F[_]](f: Boolean => F[Boolean])(implicit F: Applicative[F]): F[Json]

To:
def traverseBoolean[F[_]](f: Boolean => F[Json])(implicit F: Applicative[F]): F[Json]

I think this would allow more transformation within the monadic context. This would make it more akin to the with* methods than the map* methods, but you get a greater flexibility.

@hamnis
Copy link
Collaborator

hamnis commented Apr 22, 2024

I think this would a nice set of combinators to have, @sergeykolbasov are you willing to make the changes suggested by @zarthross ?

The boolean case is an example, it would be the same for all the new traverseX functions

@hamnis
Copy link
Collaborator

hamnis commented May 15, 2024

mimaErrors are genuine. We do not have these in previous releases, so we need to add exclusions rules here.

@hamnis hamnis removed the request for review from travisbrown July 2, 2024 09:17
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 30 lines in your changes missing coverage. Please review.

Project coverage is 85.03%. Comparing base (2e435be) to head (66477cf).

Current head 66477cf differs from pull request most recent head f9c23f4

Please upload reports for the commit f9c23f4 to get more accurate results.

Files Patch % Lines
...les/core/shared/src/main/scala/io/circe/Json.scala 0.00% 30 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@                Coverage Diff                @@
##           series/0.14.x    #1648      +/-   ##
=================================================
- Coverage          85.13%   85.03%   -0.10%     
=================================================
  Files                 76       61      -15     
  Lines               2772     2453     -319     
  Branches             369      145     -224     
=================================================
- Hits                2360     2086     -274     
+ Misses               412      367      -45     
Flag Coverage Δ
2.12 ?
2.13 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

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

hamnis
hamnis previously approved these changes Jul 2, 2024
@hamnis hamnis merged commit b70a2ce into circe:series/0.14.x Aug 14, 2024
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.

5 participants