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 8 forks source link

Provide a way to (de)serialize metas #65

Closed dlurton closed 2 years ago

dlurton commented 2 years ago

Currently, metas associated with an IonElement are lost when the element is round-tripped through Ion binary or text formats and back again. Thus, it is up to the application to provide a way to persist metas, if the application cares about them, but this library probably should provide some assistance here--such as APIs to specify functions that (de)serialize metas.

element_with_metas::(
     (lit 42) --the original node
     { '$source_location': (1, 1) } -- the meta information associated with the original node.
)
dlurton commented 2 years ago

Oops, duplicates #20