field « serialize « Java I/O Q&A





1. Ignore a field during Java JSON-RPC serialization; [ScriptIgnore]?    stackoverflow.com

I'm getting "JSONRpcClientException: ... circular reference." when serializing my domain objects with JSON. (using jsonrpc1.0). I'd like to maintain the domain as it is, but need to get JSON-RPC working so I ...

2. How to handle a Findbugs "Non-transient non-serializable instance field in serializable class"?    stackoverflow.com

Consider the class below. If I run Findbugs against it it will give me an error ("Non-transient non-serializable instance field in serializable class") on line 5 but not on line 7.

1 ...

3. FindBugs - SE_BAD_FIELD rule, why it ignores java.lang.Object?    stackoverflow.com

From the description of SE_BAD_FIELD:

Non-transient non-serializable instance field in serializable class This Serializable class defines a non-primitive instance field which is neither transient, Serializable, ...

4. Making class fields non serializable using PropertyDescriptor    coderanch.com

Hello to all readers of this topic! Suppose I have a class A with set of fields and method that makes em non-serializable: public class A { private String field1; ..... private String fieldN; .... here should be setters/getters for fields..... public static void makePropertiesTransient(Class clazz) { try { BeanInfo info = Introspector.getBeanInfo(clazz); PropertyDescriptor[] descriptors = info.getPropertyDescriptors(); for (PropertyDescriptor pd : ...

5. Externalizable vs Serializable with volatile fields    coderanch.com

If you see the documentation, Externalizable interface says "Only the identity of the class of an Externalizable instance is written in the serialization stream and it is the responsibility of the class to save and restore the contents of its instances. The writeExternal and readExternal methods of the Externalizable interface are implemented by a class to give the class complete control ...