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: parsing bug when using json dryFormat and the body is a json array #322

Merged
merged 2 commits into from
Dec 6, 2023

Conversation

reubenmiller
Copy link
Owner

Fixing a small bug which resulted in the json dry format output being converted to a string instead of an array.

Example

Doing a dry run on a request where the body is a json array.

c8y api POST /some/api --template '[{"name":"foo"}]' --dry --dryFormat json | c8y util show --select body -o json

Before

{
  "body": "[{\"name\":\"foo\"}]\n"
}

After

{
  "body": [
    {
      "name": "foo"
    }
  ]
}

@reubenmiller reubenmiller merged commit a0c8dfd into v2 Dec 6, 2023
4 checks passed
@reubenmiller reubenmiller deleted the fix-jsonarray-dry-format branch December 6, 2023 17:09
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.

1 participant