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

Added Json.dropNullValues. #983

Merged
merged 1 commit into from Mar 1, 2019
Merged

Added Json.dropNullValues. #983

merged 1 commit into from Mar 1, 2019

Conversation

orium
Copy link
Contributor

@orium orium commented Oct 9, 2018

No description provided.

@orium
Copy link
Contributor Author

orium commented Oct 9, 2018

Not sure if this is "too specific" to be added to Json, but it is something that I often use and can be useful for others (see #584 and #585).

Maybe it would be nicer to make it def dropNullValues(deep: Boolean = false): Json?

@codecov-io
Copy link

codecov-io commented Oct 9, 2018

Codecov Report

Merging #983 into master will decrease coverage by 0.07%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #983      +/-   ##
=========================================
- Coverage   85.28%   85.2%   -0.08%     
=========================================
  Files          75      75              
  Lines        2351    2352       +1     
  Branches      160     161       +1     
=========================================
- Hits         2005    2004       -1     
- Misses        346     348       +2
Impacted Files Coverage Δ
...les/core/shared/src/main/scala/io/circe/Json.scala 78.34% <0%> (-0.51%) ⬇️
...rc/main/scala/io/circe/shapes/SizedInstances.scala 78.57% <0%> (-14.29%) ⬇️
...rc/main/scala/io/circe/numbers/BiggerDecimal.scala 89.37% <0%> (-0.63%) ⬇️
.../core/shared/src/main/scala/io/circe/Decoder.scala 93.01% <0%> (+0.31%) ⬆️
...re/shared/src/main/scala/io/circe/JsonNumber.scala 93.58% <0%> (+1.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 6caa097...0c66b4f. Read the comment docs.

@poslegm
Copy link
Contributor

poslegm commented Mar 1, 2019

It seems very useful for me! Any chance that it will be merged?

@travisbrown
Copy link
Member

I've been wanting to avoid this and leave the presence or absence of null values as a printing-level issue, but there seems to be enough demand that I guess I should give that up. I'll merge this as-is, and if someone wants to add the deep version we can review it when it comes up.

@travisbrown travisbrown merged commit f106a9b into circe:master Mar 1, 2019
@realvictorprm
Copy link

funny thing, this is just something I wanted to use and then I noticed that this was merged a day ago 😄 nice stuff 😃

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

5 participants