[OT] Do you see a problem in this serialization format ?
yawniek via Digitalmars-d
digitalmars-d at puremagic.com
Tue Jun 7 04:52:55 PDT 2016
On Tuesday, 7 June 2016 at 11:22:55 UTC, Basile B. wrote:
> On Tuesday, 7 June 2016 at 10:24:56 UTC, WebFreak001 wrote:
>> On Tuesday, 7 June 2016 at 02:11:55 UTC, Basile B. wrote:
>>> I had to make a custom format because
> SDL would have the same problem as JSON. I need to store the
> type, so key = value does not work and an object (that contains
> name = "thename", type = "thetype", value = "value") must be
> created for each property. The serialisation data become huge
> and is painfull to read.
not necessarily and i don't completely understand why you want to
include the schema in each message. this is a lot of bloat. and
once you need more complicated datastructures it will be hard
anyway and you need manual glue code. e.g. `Dlist!string[] mylist
= <here be dragons>`
i would go for protobufs, thrift or if you want something easy to
parse then json maybe with json schema.
plug: try https://github.com/tamediadigital/asdf
it was more or leass created for what you want.
- no object instantiation overhead
- instead of "factory" methods you just use the deserializer
methods
More information about the Digitalmars-d
mailing list