Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow persisting of metas #20

Open
dlurton opened this issue Jun 11, 2020 · 0 comments
Open

Allow persisting of metas #20

dlurton opened this issue Jun 11, 2020 · 0 comments

Comments

@dlurton
Copy link
Contributor

dlurton commented Jun 11, 2020

Currently we do not persist metas in any form. However, it might be useful to allow metas to be persisted in Ion to

/* or Element, depending on the interface which defines metas at the time of implementation */
interface IonElement { 
    // Change metas to:
    val metas: Map<String, IonElementConvertible>
}

interface IonElementConvertible {
   fun toIonElement(): IonElement
}

This also implies the need for some method of reading metas. For that:

interface IonElementTransformer<T> {
    fun transform(element: IonElement): T
}

interface IonElementLoaderOptions {
    val metaLoaderRegistry: Map<String, IonElementTransformer<IonElementConvertible>>
}

IonElementLoaderOptions is also described in #19

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant