I added the old and new Einhugur JSON plugins to my recordset serialization testing (Did not try MBS as I don't have a current license, and this project does not warrant buying one)
Here are the results from compiled apps:
Time (sec) Size (MB)
Mac Win Initial Ziped
Memory block 0.73 0.51 7.18 1.44
JSONItem 26.95 21.90 7.24 1.33
JSONItem_MTC 2.10 1.69 7.24 1.33
Xojo.Data 0.63 0.66 7.46 1.40
Einhugur Old 0.82 0.74 6.42 1.24
Einhugur New 4.85 3.89 16.61 1.56
The old Einhugur plugin performs very well but has some issues... apparently it does not have unicode support, and I could not find a way of setting an item to null - which is important for dealing with recordsets.
The new one, beside having unicode support, is a lot nicer to code with... right now though it looks like there is a bug which prevents it from putting out compact JSON strings - which explains the large initial string size.... but it looks like it is slower than Kem's Xojo code solution!
My Memoryblock based class performs well ... but outputs binary strings in a non standard format. On the client side it would not require any "deserialization" per say... Accessing non string fields come down to just doing a BinaryStream read (strings need justa little more processing ) directly against the string sent, so very light weight on the client.
But that simplicity comes at the price of flexibility for things other than simply reading the values. i think there are use cases where it would be best (particularly if is there is a lot of BLOB type data and or the client does not have a lot of resources), but JSON would be more generally useful.
As much as I dislike the Xojo.framework, from these options, for this use, it looks like that would be best (BTW it looks like TEXT autoconverts to string on assignment now ... I did not think that used to be the case!)... but as it will be encapsulated in a class and output a string, once I finish the class i won't have to deal with the Xojo.framework at all.
So my serialization class will have the option of either outputting JSON (via Xojo.Data under the hood) or a binary string from my memoryblock based class .
The deserialization class (when done) will be able to handle either.... and the JSON part will be very easy to write.