#community-help

Storing JSON Objects: Stringify Vs Break Up

TLDR Ricardo inquired regarding the best method to store a JSON object. Kishore Nallan suggested stringifying and storing if no search on the object is required.

Powered by Struct AI

1

4
31mo
Solved
Join the chat
May 08, 2021 (31 months ago)
Ricardo
Photo of md5-a2785b9d22ba23f3627d4bd877e95e7c
Ricardo
03:04 PM
if i need to store something that is a json object. what's the best approach stringify it and store it as one piece. or break it up into multiple fields (int32 and string)? I will always be returning it all together.
Kishore Nallan
Photo of md5-4e872368b2b2668460205b409e95c2ea
Kishore Nallan
04:04 PM
If you are not planning to search on the JSON object you can just stringify and store it.
04:04
Kishore Nallan
04:04 PM
And just ensure that the field is not part of the schema and it won't be indexed.
Ricardo
Photo of md5-a2785b9d22ba23f3627d4bd877e95e7c
Ricardo
05:27 PM
awesome, thanks again Kishore Nallan

1