-
Notifications
You must be signed in to change notification settings - Fork 15
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
inspect
doesn't write delimiting commas after nested containers
#17
Comments
zslayton
added a commit
that referenced
this issue
Aug 10, 2022
* Upgrades dependency on `ion-rs` to v0.12.0 * Updates `ion-schema` to v0.4.0, which uses ion-rs v0.12.0 * Modifies the way encoding lengths are calculated following a change in the v0.12.0 binary reader API. * Fixes issue #17; nested containers now have a trailing comma where necessary. * Adds a `beta count` command that prints the number of top-level values in a given stream. * Adds a `beta primitive` command that prints the decimal and hex representations of a value's primitive encoding (For example: the VarUInt encoding of 527.)
zslayton
added a commit
that referenced
this issue
Aug 10, 2022
* Upgrades ion-rs, adds beta 'count' and 'primitive' commands * Upgrades dependency on `ion-rs` to v0.12.0 * Updates `ion-schema` to v0.4.0, which uses ion-rs v0.12.0 * Modifies the way encoding lengths are calculated following a change in the v0.12.0 binary reader API. * Fixes issue #17; nested containers now have a trailing comma where necessary. * Adds a `beta count` command that prints the number of top-level values in a given stream. * Adds a `beta primitive` command that prints the decimal and hex representations of a value's primitive encoding (For example: the VarUInt encoding of 527.)
Fixed in PR #28. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When stepping out of a container,
ion beta inspect
will print the appropriate closing delimiter. (]
for lists,)
for s-expressions,}
for structs.) However, if that container is nested, it should also print a delimiting,
if the parent container is a list or struct.This screenshot demonstrates the incorrect behavior:
Reproducing the command here for copy/pasting:
This isn't currently trivial to fix. Ideally, the reader would expose a method that allows applications to query for its current context. Something like:
that would return
None
at the top level andSome(container_type)
at any other depth. Absent such an API, the application would need to track the reader's traversal manually.The text was updated successfully, but these errors were encountered: