[Just Pushed]: xContent - A JSON abstraction allowing for other types

Hi,

Just pushed this:
http://github.com/elasticsearch/elasticsearch/issues/issue/152. Basically,
the idea I had is to create a wrapper on top of how elasticsearch handles
JSON allowing for other wire formats (with same JSON characteristics) to be
supported. The first implementation aside from JSON is XSON, which is an
optimized binary format of JSON (I will doc the BNF soon).

A note for Java API users, some classes have been renamed. The previous
JsonXXX have been removed and renamed. Also, by default, the query / filter
builders and the search source builders use the XSON format which means
faster operations :). It is up to you to decide how to encode the indexable
data, either using JSON or XSON. ElasticSearch will automatically handle
both.

cheers,
shay.banon

Hi Shay,

sounds very cool, but why didn't you use BSON (http://bsonspec.org),
rather than your own binary format?

On Thu, Apr 29, 2010 at 10:14 PM, Shay Banon
shay.banon@elasticsearch.com wrote:

Hi,
Just pushed
this: XContent - An abstraction on top of content (JSON inspired) · Issue #152 · elastic/elasticsearch · GitHub.
Basically, the idea I had is to create a wrapper on top of how elasticsearch
handles JSON allowing for other wire formats (with same JSON
characteristics) to be supported. The first implementation aside from JSON
is XSON, which is an optimized binary format of JSON (I will doc the BNF
soon).
A note for Java API users, some classes have been renamed. The previous
JsonXXX have been removed and renamed. Also, by default, the query / filter
builders and the search source builders use the XSON format which means
faster operations :). It is up to you to decide how to encode the indexable
data, either using JSON or XSON. Elasticsearch will automatically handle
both.
cheers,
shay.banon

--
Sergio Bossa
http://www.linkedin.com/in/sergiob

BSon might also be supported, but I don't really like the format as its not
aimed at streaming data (pull parsing). For example, you need to write the
size of the array before you write all its elements. This is an aspect of
JSON that I really wanted to preserve.

Also, BSON is a superset of JSON, while XSON is exactly like JSON.

cheers,
shay.banon

On Thu, Apr 29, 2010 at 11:19 PM, Sergio Bossa sergio.bossa@gmail.comwrote:

Hi Shay,

sounds very cool, but why didn't you use BSON (http://bsonspec.org),
rather than your own binary format?

On Thu, Apr 29, 2010 at 10:14 PM, Shay Banon
shay.banon@elasticsearch.com wrote:

Hi,
Just pushed
this: http://github.com/elasticsearch/elasticsearch/issues/issue/152.
Basically, the idea I had is to create a wrapper on top of how
elasticsearch
handles JSON allowing for other wire formats (with same JSON
characteristics) to be supported. The first implementation aside from
JSON
is XSON, which is an optimized binary format of JSON (I will doc the BNF
soon).
A note for Java API users, some classes have been renamed. The previous
JsonXXX have been removed and renamed. Also, by default, the query /
filter
builders and the search source builders use the XSON format which means
faster operations :). It is up to you to decide how to encode the
indexable
data, either using JSON or XSON. Elasticsearch will automatically handle
both.
cheers,
shay.banon

--
Sergio Bossa
http://www.linkedin.com/in/sergiob

Thanks, I'll take a look.

Sergio Bossa
Sent by iPhone

Il giorno 29/apr/2010, alle ore 22.21, Shay Banon <shay.banon@elasticsearch.com

ha scritto:

BSon might also be supported, but I don't really like the format as
its not aimed at streaming data (pull parsing). For example, you
need to write the size of the array before you write all its
elements. This is an aspect of JSON that I really wanted to preserve.

Also, BSON is a superset of JSON, while XSON is exactly like JSON.

cheers,
shay.banon

On Thu, Apr 29, 2010 at 11:19 PM, Sergio Bossa
sergio.bossa@gmail.com wrote:
Hi Shay,

sounds very cool, but why didn't you use BSON (http://bsonspec.org),
rather than your own binary format?

On Thu, Apr 29, 2010 at 10:14 PM, Shay Banon
shay.banon@elasticsearch.com wrote:

Hi,
Just pushed
this: Issues · elastic/elasticsearch · GitHub

Basically, the idea I had is to create a wrapper on top of how
elasticsearch
handles JSON allowing for other wire formats (with same JSON
characteristics) to be supported. The first implementation aside
from JSON
is XSON, which is an optimized binary format of JSON (I will doc
the BNF
soon).
A note for Java API users, some classes have been renamed. The
previous
JsonXXX have been removed and renamed. Also, by default, the
query / filter
builders and the search source builders use the XSON format which
means
faster operations :). It is up to you to decide how to encode the
indexable
data, either using JSON or XSON. Elasticsearch will automatically
handle
both.
cheers,
shay.banon

--
Sergio Bossa
http://www.linkedin.com/in/sergiob