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

fix: Add json array check when determining CBOR of JSON encoding #896

Merged
merged 5 commits into from
Jun 14, 2021

Conversation

phanvanhai
Copy link
Contributor

@phanvanhai phanvanhai commented Jun 12, 2021

PR Checklist

Please check if your PR fulfills the following requirements:

  • Tests for the changes have been added (for bug fixes / features)
  • Docs have been added / updated (for bug fixes / features)

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • Other... Please describe:

What is the current behavior?

Only check for JSON format starting with {

Issue Number: #894

What is the new behavior?

Add a check for JSON format starting with [ for arrays.

Does this PR introduce a breaking change?

  • Yes
  • No

Are there any new imports or modules? If so, what are they used for and why?

No

Are there any specific instructions or things that should be known prior to reviewing?

Other information

@codecov-commenter
Copy link

codecov-commenter commented Jun 12, 2021

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

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 63.61%. Comparing base (a453267) to head (e19f04b).

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

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #896   +/-   ##
=======================================
  Coverage   63.61%   63.61%           
=======================================
  Files          32       32           
  Lines        2097     2097           
=======================================
  Hits         1334     1334           
  Misses        673      673           
  Partials       90       90           

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

lenny-goodell
lenny-goodell previously approved these changes Jun 14, 2021
Copy link
Member

@lenny-goodell lenny-goodell left a comment

Choose a reason for hiding this comment

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

LGTM

@lenny-goodell lenny-goodell changed the title Add json array check Fix: Add json array check when determining CBOR of JSON encoding Jun 14, 2021
@lenny-goodell
Copy link
Member

@phanvanhai , a couple PR process issues to resolve:

  1. We require commits to be signed-off. See details next to the failing DCO above
  2. We using conventional commit messages for both the commit and PR title. See here for more detail: https://github.com/edgexfoundry/app-functions-sdk-go/blob/master/.github/CONTRIBUTING.md

You can use git commit -s --amend to fix both issues. Change commit message to match the new PR tile that I edited

@lenny-goodell lenny-goodell changed the title Fix: Add json array check when determining CBOR of JSON encoding fix: Add json array check when determining CBOR of JSON encoding Jun 14, 2021
@lenny-goodell lenny-goodell linked an issue Jun 14, 2021 that may be closed by this pull request
@phanvanhai
Copy link
Contributor Author

Sorry I'm not fluent in git yet. If the problem is still there, please suggest me to fix it.

@lenny-goodell
Copy link
Member

@phanvanhai , it is still failing since original commit is still there (i.e. commits not squashed) , but I can fix that when I merge the PR.
Take a look at the Edgex contributor Guide & Process here:
https://wiki.edgexfoundry.org/display/FA/Contributor%27s+Guide
https://wiki.edgexfoundry.org/display/FA/Contributor%27s+Process
Let me know if you have any questions.

@lenny-goodell lenny-goodell merged commit d07bca6 into edgexfoundry:master Jun 14, 2021
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.

Add json array check
3 participants