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

JSON Codec Updates #6444

Merged
merged 6 commits into from
Jun 16, 2020
Merged

JSON Codec Updates #6444

merged 6 commits into from
Jun 16, 2020

Conversation

alexanderbez
Copy link
Contributor

Use cdc.JSONMarshaler where applicable instead of the deprecated ctx.Codec.


Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.

  • Targeted PR against correct branch (see CONTRIBUTING.md)
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work.
  • Code follows the module structure standards.
  • Wrote unit and integration tests
  • Updated relevant documentation (docs/) or specification (x/<module>/spec/)
  • Added relevant godoc comments.
  • Added a relevant changelog entry to the Unreleased section in CHANGELOG.md
  • Re-reviewed Files changed in the Github PR explorer

@codecov
Copy link

codecov bot commented Jun 15, 2020

Codecov Report

Merging #6444 into master will decrease coverage by 0.01%.
The diff coverage is 6.77%.

@@            Coverage Diff             @@
##           master    #6444      +/-   ##
==========================================
- Coverage   55.79%   55.78%   -0.02%     
==========================================
  Files         465      465              
  Lines       27800    27809       +9     
==========================================
+ Hits        15512    15513       +1     
- Misses      11183    11190       +7     
- Partials     1105     1106       +1     

@alexanderbez alexanderbez marked this pull request as ready for review June 15, 2020 20:47
@alexanderbez alexanderbez added R4R and removed WIP labels Jun 15, 2020
@alexanderbez alexanderbez requested a review from tac0turtle June 15, 2020 21:12
Copy link
Member

@tac0turtle tac0turtle left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

Copy link
Collaborator

@fedekunze fedekunze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK

@aaronc aaronc added the A:automerge Automatically merge PR once all prerequisites pass. label Jun 16, 2020
@mergify mergify bot merged commit 35312d0 into master Jun 16, 2020
@mergify mergify bot deleted the bez/update-cdc-json branch June 16, 2020 00:20
@@ -370,10 +370,10 @@ func (ctx Context) PrintOutput(toPrint interface{}) error {
out, err = yaml.Marshal(&toPrint)

case "json":
out, err = ctx.JSONMarshaler.MarshalJSON(toPrint)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is now using JSONMarshaler we don't actually need to deprecate this in favor of Println do we? Is that right @alexanderbez ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good question. I can't recall why the TODO was added. I think we'll still need this, no?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main difference is that Println can use ctx.Output if it's set instead of stdout, which I think makes sense anyway. I'm doing some fixes to Println in #6367 and I'm thinking to just update PrintOutput instead and remove Println.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A:automerge Automatically merge PR once all prerequisites pass.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants