Hashtable not in any way serializable?
Seems the popular alternative is with
BinaryFormatter that’s unavailable here.
Easy data access of a Hashtable would have been preferable, so im wondering what others might do.
Im looking to create a somewhat efficient, if not fast, non volatile memory manager, due to the nature of the data I dont see a fully stringified solution as json or xml to be any good here and a db way overkill.
If nothing else ill continue byte banging arrays but i find it’s tedious.
and for configuration storage, using bson instead of json is more efficient and is also supported in this same library.
Snap. I didnt realize the lib supported bson.
Honestly, I immedialy dismissed json as a viable option, but having just reinvented the wheel, i realize how much work a generic binary serializer is. That said, efficently writing to blocked memory seems to be most of the work regardless of the format you choose to write.
Silly question maybe, but as im exploring the
Json lib, I cant seem to figure out how to simply remove a property from a JObject.
Perhaps ive been spoiled with
Linq, but with that i can simple use the
No doubt this is a streamlined json client but is this abstraction not possible?
I suppose instead of removing the unwanted object, i could do the inverse and create a new collection, then loop and only add the objects to keep.
Please, what is the better way?
I guess I never needed to do that, so it’s not in the library. If you open an issue on github for that, I will add it to the lib (or you can just add it and do a PR).
Writing config stuff to SecureStorage with wear leveling is straightforward - there’s another recent thread on that.
I commonly believe it is nice to abstract as much of the implementation details as possible if the overhead doesn’t make it unfeasible.
Ill use the library a bit more and see where things make sense.
Yes, you were probably referring to threads i started regarding such things.
I would ask what you might consider straightforward.
Id agree there’s not that much to it if you’re satisfied with sacrificing 2 properties id rather not.
- merely writing and recalling byte arrays and allowing the consuming code to take care of the data format
- forego use of all the available memory and just write against the start of a block each write.
Id like to pass in objects generically, encode them efficiently, while using every byte of memory to minimize wear.
If you might know of something like that which already exists, the esp32 Preferances lib comes to mind, please do share , unfortunately the time to work on such a lib is limited
That said i do believe i have something now working, ill post when i can make some unit tests