Skip to content

Comments

Don't insert newlines when encoding unknown terms using jsone:term_to_json_string/1#78

Merged
sile merged 1 commit intomasterfrom
fix-term-to-json-string
Oct 3, 2022
Merged

Don't insert newlines when encoding unknown terms using jsone:term_to_json_string/1#78
sile merged 1 commit intomasterfrom
fix-term-to-json-string

Conversation

@sile
Copy link
Owner

@sile sile commented Oct 1, 2022

Before (master branch)

> jsone:encode(list_to_tuple([{I,self()} || I <- lists:seq(1,6)])).
<<"\"{{1,<0.199.0>},\\n {2,<0.199.0>},\\n {3,<0.199.0>},\\n {4,<0.199.0>},\\n {5,<0.199.0>},\\n {6,<0.199.0>}}\"">>

After (This PR)

> jsone:encode(list_to_tuple([{I,self()} || I <- lists:seq(1,6)])).
<<"\"{{1,<0.191.0>},{2,<0.191.0>},{3,<0.191.0>},{4,<0.191.0>},{5,<0.191.0>},{6,<0.191.0>}}\"">>

@sile
Copy link
Owner Author

sile commented Oct 1, 2022

[NOTE] rebar3 eunit failed on OTP 25.1 due to the bug addressed in erlang/otp#6322. I'll re-run the CI once OTP 25.1.1 is released.

@codecov-commenter
Copy link

Codecov Report

Merging #78 (d3cca5a) into master (e49d378) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master      #78   +/-   ##
=======================================
  Coverage   91.91%   91.91%           
=======================================
  Files           4        4           
  Lines         334      334           
=======================================
  Hits          307      307           
  Misses         27       27           
Impacted Files Coverage Δ
src/jsone.erl 82.60% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@sile sile merged commit a7f0900 into master Oct 3, 2022
@sile sile deleted the fix-term-to-json-string branch October 3, 2022 22:33
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.

2 participants