ion-java icon indicating copy to clipboard operation
ion-java copied to clipboard

Determine how to handle system transcode from Ion 1.0 to Ion 1.1

Open tgregg opened this issue 1 year ago • 1 comments

We've decided not to support Ion 1.0-style symbol table syntax in Ion 1.1. This means that doing a system-level transcode from Ion 1.0 to Ion 1.1 cannot maintain that syntax. I see a few options:

  1. The library prohibits system-level transcoding from Ion 1.0 to Ion 1.1. That way an Ion 1.0 symbol table cannot be transcoded verbatim to an Ion 1.1 stream, which could result in symbol IDs that cannot be resolved because the symbol table is no longer a system value.
  2. The library intercepts Ion 1.0 symbol tables when transcoded to an Ion 1.1 writer, converting them to Ion 1.1 encoding directives.

Option 2 may be nice to have, but it requires a fair amount of code. It should be noted that system-level transcoding is a private API that should only be leveraged in tooling authored by Ion developers. I'd lean toward Option 1 until we identify a clear need for Option 2.

tgregg avatar Nov 26 '24 20:11 tgregg

Another option we just discussed is that we could support Ion 1.0-style symbol tables in Ion 1.1, and that encountering one would prefix the resulting symbol table with the Ion 1.0 system symbols. This would make it possible to do a system-level transcode from Ion 1.0 to Ion 1.1 without transforming symbol IDs.

tgregg avatar Nov 26 '24 21:11 tgregg