Coerce object to String

Would there be interest in a PR? I would think others have this same problem. Perusing XContentParser, it doesn't look that complicated.