Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有各种练习对象,其中包含用户想要的任意数量的 Set 对象的 ArrayList。
我计划将这些对象存储在 SQLite 数据库中,我认为 JSON 似乎是一个不错的选择,因为我可以在 JSONObject 中存储尽可能多的数据,无限期地存储它,然后随时检索它。
这是将动态对象数据无限期存储在有组织的数据库中的明智方法吗?
干杯
我相信这是一种明智的方式。此外,将 JSON 存储在数据库中通常是一种非常安全的方法。如果您还关心解析速度,请尝试使用 Jackson 库而不是 org.json,因为第一个比第二个快几倍。