My goal is to write a simple cli that takes in a binary ion file that uses a shared symbol table, provide that symbol table, then output that "hydrated" ion to a pretty printed text file.
Unexpectedly, what happens is that all the symbols in the input ion get output as "symbol structs". I see some mention of them in the documentation, but I'm not very clear on how to handle them or turn them off when I'm doing this relatively transparent reading/writing.
My goal is to write a simple cli that takes in a binary ion file that uses a shared symbol table, provide that symbol table, then output that "hydrated" ion to a pretty printed text file.
Unexpectedly, what happens is that all the symbols in the input ion get output as "symbol structs". I see some mention of them in the documentation, but I'm not very clear on how to handle them or turn them off when I'm doing this relatively transparent reading/writing.
Here's an example of the output:
and what'd I'd expect:
symbol annotations also get erased from structs during the conversion.
Is there any way to make this work? Am I using the wrong decoding or unmarshalling / marshalling methods or something?
I also tried just writing to the writer directly without using a "root container", and that didn't seem to have an effect.
Here's the code for my poc, minus the
getSharedSymbolTable
func in another file that isn't really relevant: