amazon-ion / ion-element-kotlin

IonElement is an immutable in-memory representation of the Ion data format. IonElement's API is idiomatic to Kotlin.
Apache License 2.0
8 stars 7 forks source link

Consider supporting `$0` #95

Open popematt opened 5 months ago

popematt commented 5 months ago

While not very common, $0 is a valid Ion symbol, but attempting to read anything containing $0 into IonElement will result in an exception being thrown.

We should consider adding support for it, if possible. Right now, SymbolElement has a non-nullable textValue: String field. Making this field nullable would be a breaking change.

popematt commented 2 months ago

As a partial improvement, we could make $0 a latent error that gets thrown only when trying to access some symbol that has unknown text rather than throwing eagerly on load.