[erlang-questions] Erlang de/serializer and data type validator
Wed Aug 3 11:44:54 CEST 2011
> Is there anything lighter? Ideally, it should be written in Erlang and
> C, as my required feature set is pretty short.
I don't know - I use OCaml anyway so I didn't notice the overhead. :)
I did think about doing this a while back
(https://github.com/n0gg1n/lingo) but never took it anywhere.
If you're working with XML, then https://github.com/willemdj/erlsom
supports generating records from an XSD schema, validating XML
documents against and translation between native Erlang (record) types
and XML. It also seems reasonably fast in my experience. For JSON I
don't know what you'd use as there isn't really a definitive schema
language for JSON not a definitive transformation language to describe
converting JSON to/from XML etc.
There are zillions of libraries for working with JSON in Erlang but
from an API point of view I like https://github.com/talentdeficit/jsx
or mochijson2. I have no idea if the NIF based bindings on github are
any faster/better as I haven't used them.
More information about the erlang-questions