JSON objects
complete
Dave Snider
complete
JSON objects are now generally available. We're working on some better UI for the application that will improve syntax highlighting, editing and validation, but the new column type and storage are now available. https://xata.io/blog/json-column-type
Kostas Botsas
in progress
Kostas Botsas
Merged in a post:
JSON data type
Chris Hiester
Support for JSON data type
Kostas Botsas
planned
Gustavo
I have two use cases:
a) A
similarities
field in the format { [key: string]: number }
, for example: { dentistry: 10, medicine: 7, law: 3, ... }
. I'd use it for my recommendation system. Suppose a user interested in law
, I'd like to query records where law > 7
. I intend to use it together with vector search, in the filter
parameter, so I can ensure that the vector search won't ever show irrelevant stuff. That JSON would have an unknown number of key/value pairs (likely hundreds) and wouldn't conform to a rigid schema. Also, automatic schema expansion wouldn't be desired because it would render the web UI useless due to the quantity of columns that it would create.b) A
layers
field that stores information similar to Photoshop layers. In this case, the schema is more complicated with arrays and objects leveraging TypeScript's discriminated unions.I'd also like to leave a link to how SQLite works with JSON as it can inspire Xata: https://www.sqlite.org/json1.html