We're not the only ones discussing XML vs JSON it seems... DJB's netstrings are another interesting (secure/parser friendly) approach and I reckon at least one implementation will appear which talks OCCI to nodes over protocol buffers before long.
With the current proposal it doesn't matter - it's just key-value pairs and there's only so many ways you can render them which can trivially be described in the spec (e.g. "space separated text")
Sam
------------------------------------------------------------------------It was many years ago popular to use line breaks as delimiters in data,
and on each line have essentially attribute/value pairs.
Then we got XML that today seems to be what people want to use (because
there are libraries, and tons of programmers that can (not?) implement
XML parsers). We also have "content-length prefixed" XML data, that make
things sort of simpler.
Sort of in parallell, we have xmlrpc, that to some degree solve slightly
different problems.
Personally, I have lately looked at JSON, and after serializing data and
then use Netstrings (http://cr.yp.to/proto/netstrings.txt), I must say I
really like it.
For those that do not know Netstrings, here is an example from the spec:
For example, the string "hello world!" is encoded as <31 32 3a 68 65
6c 6c 6f 20 77 6f 72 6c 64 21 2c>, i.e., "12:hello world!,". The empty
string is encoded as "0:,".
Implementing is very simple, and you know how many bytes to read. An
example JSON-netstring thing can look like (for a 3-object array with a
hash as the third object, where the hash as one entry):
29:[1, "info", {"msg": "Hello"}],
In the DNS provisioning world we have come up with epp (RFC 3730) that
has a binding to TCP (RFC 3734). The binding is a prefixed-based XML
blob that is passed over the wire:
EPP Data Unit Format (one tick mark represents one bit position):
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Total Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| EPP XML Instance |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+//-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Now, we need some more protocols here (between DNS operator and the
registrar), and the question is whether the same mechanism is
recommended, or whether one should use something else?
Do Apps Area have any general feeling about this?
Patrik
_______________________________________________
Apps-Discuss mailing list
Apps-Discuss@ietf.org
https://www.ietf.org/mailman/listinfo/apps-discuss