Closed patrick-heuer closed 8 years ago
Hi @PKrause79
AFAIK, JSON does not support binary.
I don't remember doing anything like this, so, I'm not sure I can help you.
The first thing that comes to my mind was use a BASE64 serialization and then put it on the JSON. I think the SuperObject has some "Stream" methods, which may help you too.
http://stackoverflow.com/questions/1443158/binary-data-in-json-string-something-better-than-base64 http://blog.marcinbudny.com/2014/02/sending-binary-data-along-with-rest-api.html#.VemEqfnBzRY
I have a TClientDataset having a field containing binary data (TBlobField). I´m using "TResource.GetAsDataSet" and "TResource.GetAsDataSet(ADataSet: TDataSet)", but it seems for me not to be possiblt to marshal binary data from JSON...
Any idea´s how to deal with binary data? Example?
Thx!