EmitJavaStyle Enumeration
Specifies whether to generate serialization methods with Java conventions. This enumeration is used by the DataContractSerializer.
Syntax
public enum EmitJavaStyle
Members
| Member | Description |
|---|---|
None |
No Java conventions are applied. This is the default. |
JavaEnabled |
Serialization methods are generated with Java conventions, such as using camel casing for property names and omitting the `get_` and `set_` prefixes. |
Remarks
The EmitJavaStyle enumeration is used to control the naming conventions of serialized members when interoperating with Java applications. When JavaEnabled is specified, the DataContractSerializer will generate member names that follow common Java conventions, making it easier for Java clients to consume the serialized data.
For example, a C# property named MyProperty will be serialized as myProperty when JavaEnabled is set.
Tip: Use
EmitJavaStyle.JavaEnabled when serializing data that will be consumed by Java applications to ensure consistent naming and compatibility.
Requirements
Namespace: System.Runtime.Serialization
Assembly: System.Runtime.Serialization.dll