You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Benjamin Mahler <bm...@apache.org> on 2018/07/25 19:09:03 UTC

Mesos 1.7.x and JSON clients

TLDR: If you use a spec-compliant JSON parser, you will observe no change
in Mesos 1.7.x and everything will continue to work as before.

Longer version:

JSON allows strings to be encoded in several different ways. For example,
"/" can be encoded directly as "/", or "\/", "\u002F", or "\u002f". A
spec-compliant parser [1] must handle these and produce the same result for
each.

In Mesos 1.7.0, we're adopting rapidjson [2] in order to provide
performance improvements to /state serving as well as all other json
serving and serialization paths. Rapidjson will encode strings in a
spec-compliant way, but the choices differ from the original JSON
serialization code in Mesos (e.g. rapidjson encodes "/" unescaped whereas
we previously encoded the escaped form "\/").

Please be sure that your JSON libraries used for parsing comply with one of
the JSON specs. There are several updates to RFC 4627, but they are all
equivalent from the perspective of string encoding and parser requirements
for strings FWICT.

There are some other topics that warrant discussion at some point, like
number precision, but we're not changing anything in Mesos 1.7.0 related to
this.

Ben

[1] https://tools.ietf.org/html/rfc8259#section-9
[2] http://rapidjson.org/