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

The fields with null value just disappear in the output #316

Closed
semihbkgr opened this issue May 6, 2023 · 1 comment · Fixed by #317
Closed

The fields with null value just disappear in the output #316

semihbkgr opened this issue May 6, 2023 · 1 comment · Fixed by #317
Labels
bug Something isn't working

Comments

@semihbkgr
Copy link
Contributor

Describe the bug

Fields with a value of null are not available in the output.

To Reproduce

actual data

{
  "a": "alice",
  "b": null,
  "c": [
    {
      "d": 9,
      "e": null
    }
  ]
}
$ dasel -r json -f data.json

actual output:

{
  "a": "alice",
  "c": [
    {
      "d": 9
    }
  ]
}

expected output:

{
  "a": "alice",
  "b": null,
  "c": [
    {
      "d": 9,
      "e": null
    }
  ]
}
@semihbkgr semihbkgr added the bug Something isn't working label May 6, 2023
@TomWright
Copy link
Owner

This has been fixed in the development version. Fix will be included in the next release.

$ echo '{
  "a": "alice",
  "b": null,
  "c": [
    {
      "d": 9,
      "e": null
    }
  ]
}' | go run cmd/dasel/main.go -r json
{
  "a": "alice",
  "b": null,
  "c": [
    {
      "d": 9,
      "e": null
    }
  ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants