|| ((PrimitiveObjectInspector)flagInsp).getPrimitiveCategory()
!= PrimitiveCategory.BOOLEAN
|| !(flagInsp instanceof ConstantObjectInspector )) {
throw new UDFArgumentException(" ToJson takes an object as an argument, and an optional to_camel_case flag");
}
WritableConstantBooleanObjectInspector constInsp= (WritableConstantBooleanObjectInspector) flagInsp;
convertFlag = constInsp.getWritableConstantValue().get();
}
jsonFactory = new JsonFactory();
return PrimitiveObjectInspectorFactory.javaStringObjectInspector;