简体   繁体   中英

GSON is deprecated. Which one we can use to serialize and deserialize Java objects to and from JSON?

Hi I want to store the Java Objects.

I have searched and found that the GSON library is doing the conversion of Java Object to Json String and vice versa. Then I can store the converted JSON String into the Shared Preferences.

But That GSON library is deprecated and there is no update after May 2013.

Kindly provide me an alternate way to implement the same.

Thanks in advance.

GSON is not deprecated and seems to be well supported ( commit history ). If you are looking for an alternative Jackson is a popular one.

我认为这样做的原因是Google建议切换到Android Studio,如果您这样做,则无需下载jar, 只需在依赖项中简单地编译“ com.google.code.gson:gson:2.3.1”即可

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM