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:
echo '{foo:[{bar: a}, {bar: b}, {bar: c}]}' | ion dump --format binary | cargo run -- beta inspect
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:
fn parent_type(&self) -> Option<IonType>;
that would return None at the top level and Some(container_type) at any other depth. Absent such an API, the application would need to track the reader's traversal manually.
When stepping out of a container,
ion beta inspectwill 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
Noneat 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.