jsonParser.parse(entityStream, jsonHandler);
JsonValue jsonValue = jsonHandler.getJsonObject();
// jsonValue can be null if stream empty
if (jsonValue == null)
return null;
return new BeanBuilder().createObject(type, jsonValue);
}
catch (Exception e)
{
throw new IOException("Can't read from input stream " + e);
}