I'm working with amazon ion data, stored in file. I need to convert it to Json data. Is there any libraries available in Java? Or any another type of data format close to Json?
Task I'm doing
I have fetched the data from dynamoDB, which generated the .txt
file having this type of data, which is ion format (separated by new line).
{group:{s:"accounts"},rId:{s:"Ada_Invoice"},item:{s:"System Issue"},environments:{ss:["Env:Ada/Alpha"]},category:{s:"Publish"},type:{s:"Ada"},groups:{ss:["ada-admins"]}}
I have to consolidate this data around environment
. I want to convert the ion to JSONObject, so that i can perform .get()
around keys.
PS - newbie to java
One way is to use Jackson Ion library to convert ion data to POJO, then conver the POJO to JSON.
Check more details in the answer here - How to convert Amazon QLDB IonStruct to Json in java?
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.