elasticsearch/elasticsearch — pull request #6127 by mfussenegger (2014-05-12 12:31:58+00:00)
Title: add support for Byte and BytesRef to the XContentBuilder

Hi all,

currently the XContentBuilder will call .ToString() on the object as fallback if it isn't known.
This will cause Byte instances to become a String instead of staying a number and BytesRef have some kind of hex representation which is wrong.

We could work around this if course by converting the values beforehand, but for performance reasons it would be nice to have the XContentBuilder handling the cases correctly.