I'm looking for a way to convert the Amazon Ion object to JSON in Go Lang. This problem came while I was implementing a DAO layer for Amazon QLDB. What I've done so far is using a Go Struct with both json and ion aliases as follows.
type Passport struct {
ID string `json:"id" ion:"id"`
Name string `json:"name" ion:"name"`
Address string `json:"address" ion:"address"`
}
But I'm looking a way to parse Ion to Jason in run time without having static struct definitions. It would be great if you can share an util or existing library to parse ion-to-json.
Thanks in advance.
Note: I have seen few libraries for Python and NodeJs to parse ion-to-json. But I couldn't find an library for Go.
Here you have an implementation of an IonToJson function along with a test.