пт, 30 авг. 2019 г. в 11:18, Anthony Walter via lazarus <
lazarus@lists.lazarus-ide.org>:
> I've posted a new page that tests the speed and correctness of several
> pascal based JSON parsers.
>
>
Thanks for testing! My JsonStorage seems to be outsider. =)
Actually, my work requires more effective serializers, such as
Protobuffers, ASN.1 or Thrift. But I shoose Bencode, it simple and almost
human-readable text, but fast and compact as binary.
Most serialization protocols use same data structures - numbers, literals,
lists and records. Pascal type Variant suitable for any data, except
records (dictionary, name-value pairs). So, if we add records to Variant,
it will become serializable/deserializabe to many protocols. Also, it can
be used to store publushed properties and used to transfer data between
different objects/classes/records, that supports RTTI.
Even without RTTI, Variants can be used to store name-value pairs as
name-indexed array, it very handy, and present in many modern programming
languages. "Variant record" can be static, initialized once, like
VarArrayCreate(), don't allow appending new name-values.
--
*Bodrov Sergey*
software development, IT consulting
http://www.serbod.com
*Phone (Belarus):* +375(25)794-21-58
*Skype:* sergey.bodrov1
*e-mail:* ser...@gmail.com, oxot...@yandex.ru
--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus