amazon-ion / ion-python

A Python implementation of Amazon Ion.
https://amazon-ion.github.io/ion-docs/
Apache License 2.0
260 stars 50 forks source link

Fix Bug with Ion Text<>Binary Conversion #335

Open rmarrowstone opened 8 months ago

rmarrowstone commented 8 months ago

This change fixes a bug in the Ion Text<>Binary conversion where an Ion stream of multiple top-level values would be transcoded as an Ion list.

In the process of fixing it I cleaned up all of the Format comparisons to be identity of enum constant instead of string comparison of value. This is a lot more succinct and avoid helps to avoid typo errors.

Issue #, if available:

Description of changes:

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.