On 25/07/15 08:17, Aradeonas wrote:
Leonardo can you explain where you can use it?

Regards,
Ara



Currently one of my apps is sending JSON files to a server, with a structure similar to this:

{
  "document_name": "doc 1",
  "document_type": "pdf",
  "content": BASE64_ENCODED_PDF
}

Where BASE64_ENCODED_PDF is an binary file that must be converted to base64 to be included into a json field.

The base64 encoding/decoding carries both processor and transfer size overhead, compared to a binary protocol.

Of course I could have created my own proprietary protocol, but I have some constraints, for example, the sender is a Java application, and the receiver is a FreePascal one, so, using a "standard" protocol, like Google's Protocol Buffers seems to fit very well in this particular scenario.

Regards,
--
Leonardo M. Ramé
http://leonardorame.blogspot.com

--
_______________________________________________
Lazarus mailing list
Lazarus@lists.lazarus.freepascal.org
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to