public static String toJSONStringIgnoreTransient(Object object) { SerializeWriter out = new SerializeWriter(); try { JSONSerializer serializer = new JSONSerializer(out); serializer.config(SerializerFeature.SkipTransientField,false); serializer.write(object); return out.toString(); } finally { out.close(); } }