hiveTypeToJson(new MyHiveType(Arrays.asList(new Object[] { new Text("first"), new IntWritable(2) }),
getStructTypeInfo(names, types)));
}
private void hiveTypeToJson(HiveType obj) {
ContentBuilder.generate(out, new HiveValueWriter()).value(obj).flush().close();
System.out.println(out.bytes());
}