Java – what is the method to insert a large amount of JSON data into SQLite dB in Android?

I have a large JSON request, that is, it has about 50K rows and 15 columns. I must insert it into SQLite dB with the same structure. This is, I must copy the same data allocated in Postgres DB to SQLite database in my application. Is there an effective method? Are there any APIs or things that can help you work?

I have to tell me that I can use small JSON data to process OMR Lite, but when I try to use larger data, my application crashes and runs out of memory

If you have some ideas or examples that I can follow, I will be very grateful! Thank you in advance!

You can also use Google's official gson streaming library

Gson Streaming:Gson Streaming

Jsonreader plays a very important role in parsing JSON using streaming library

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>