Expo-SQLite - Support for JSON data type

Please provide the following:

  1. SDK Version: 49.0.5
  2. Platforms(Android/iOS/web/all): Android
  3. Add the appropriate “Tag” based on what Expo library you have a question on.

Does expo-sqlite supports or plan to support JSON datatype which is now supported SQLite by default?

https://www.sqlite.org/json1.html

It doesn’t support the datatype of “JSON”:

“SQLite stores JSON as ordinary text. Backwards compatibility constraints mean that SQLite is only able to store values that are NULL, integers, floating-point numbers, text, and BLOBs. It is not possible to add a sixth “JSON” type.” - JSON Functions And Operators

It supports JSON functions to help with serialization/deserialization really, you can use those today. However, keep in mind Android runs super old versions of sqlite, so it will likely not work on most devices. Android doesn’t even support STRICT tables which is kinda bonkers.

In my personal opinion, handle the JSON yourself in code.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.