All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.partiql.lang.schemadiscovery.IonExampleParser.kt Maven / Gradle / Ivy

There is a newer version: 1.0.0-perf.1
Show newest version
package org.partiql.lang.schemadiscovery

import com.amazon.ion.IonReader
import com.amazon.ion.IonSystem
import com.amazon.ion.IonValue

/**
 * Basic parser for ion data.
 */
class IonExampleParser(val ion: IonSystem) {
    /**
     * Returns the next [IonValue] or null if there are no move values to read.
     */
    fun parseExample(reader: IonReader): IonValue? {
        reader.next() ?: return null
        return ion.newValue(reader)
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy