[erlang-questions] Erlang de/serializer and data type validator

Motiejus Jakštys desired.mta@REDACTED
Wed Aug 3 08:32:19 CEST 2011


On Tue, Aug 02, 2011 at 09:10:49PM +0100, Tim Watson wrote:
> http://piqi.org/ might also be worth a look.

Looks good. Actually, if I understand correctly, it's exactly what I`m
looking for. A thing that allows me to translate XML/JSON documents to
native Erlang data types according to schema and serialize back.

I cannot force our clients to use piqi, we either have to use JSON or
XML.

> 2011/8/2 Ulf Wiger <ulf.wiger@REDACTED>:
> >
> > Hi Motiejus,
> > Perhaps you should look into Joe Norton's work with UBF?
> > UBF is a type system for describing contracts between services.
> > http://www.sics.se/~joe/ubf/site/home.html (for original documentation)
> > https://github.com/norton/ubf (for the current stuff)
> > There is a UBF-to-JSON converter. There is also one for Thrift, and Joe
> > Norton has combined UBF, UBF-JSON and QuickCheck to do validation of web
> > services.
> > I don't think UBF to XML would be particularly difficult.
> > There may be some more work that needs to be done before it fits your
> > problem. OTOH, you might get a lot of other benefits going this route.
> > BR,
> > Ulf W
> > On 2 Aug 2011, at 10:27, Motiejus Jakštys wrote:
> >

After reading all I could find about UBF, it looks too big (and
incomplete) for me.

If I worked with other UBF services (my clients), it would be just fine
-- we exchange UBF data and everybody's happy. What is more, I could
define a strict protocol and give message validation to UBF.

However, we already have message formats and transport implemented. All
I needed is UBF(b) with conversion to XML (like Ulf said, it wouldn't be
difficult). But UBF in my scenario is an overkill.

Motiejus



More information about the erlang-questions mailing list