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

No newline after each stream written by ion dump -f pretty #36

Closed
zslayton opened this issue Nov 3, 2022 · 1 comment · Fixed by #54
Closed

No newline after each stream written by ion dump -f pretty #36

zslayton opened this issue Nov 3, 2022 · 1 comment · Fixed by #54

Comments

@zslayton
Copy link
Contributor

zslayton commented Nov 3, 2022

Related to amazon-ion/ion-rust#437.

When dumping multiple input files, the missing trailing newline causes the last and first values in successive streams to run together, modifying the data or producing illegal syntax.

image

Note that the 3 at the end of each stream and the 1 of the next stream are concatenated to form legal-but-wrong 31s.

@jobarr-amzn
Copy link
Contributor

This also applies for the lines format, and more generally.

zslayton added a commit that referenced this issue Jun 12, 2023
Prior to this PR, 'to' and 'from' were commands that each took a 'format'
flag that could be used to specify 'json'. This patch promotes 'to' and
'from' into namespaces that each have a nested 'json' command. This makes
it easier to add support for other subcommands in 'to' and 'from', and
allows those subcommands to expose settings that only make sense for the
corresponding format. (For example: configuring a catalog for Ion data,
or a list of supported tags for CBOR.)

Also fixes #36 by manually outputting a newline after writing any file
in an Ion text format.
zslayton added a commit that referenced this issue Jun 13, 2023
Prior to this PR, `to` and `from` were commands that each took a `format`
flag that could be used to specify `json`. This patch promotes `to` and
`from` into namespaces that each have a nested `json` command. This makes
it easier to add support for other subcommands in `to` and `from`, and
allows those subcommands to expose settings that only make sense for the
corresponding format. (For example: configuring a catalog for Ion data,
or a list of supported tags for CBOR.)

Also fixes #36 by manually outputting a newline after writing any file
in an Ion text format.
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 a pull request may close this issue.

2 participants