https://toitlang.org/ logo
storage buckets and custom objects
# help
a
I see that storage buckets can store custom objects if they ultimately extend something like a List? (probably).. I have an object that contains 2 lists, and was wondering if there is a shortcut to being able to just store this? Or should I rework it to be a single List? 🙂
pretty sure I already know the answer 😄
f
The data needs to be serializable by tison (more or less the same as JSON)
There are no hooks for custom objects atm
a
but If I do something such as
class V3DataField extends ByteArray:
that should be storable?
f
I would definitely not do that
Who knows where we expected that byte arrays are the things we know about... Could work from time to time and then silently fail...
a
Right, I'll just store and retrieve my own bytes in that case 🙂