There are some things that are not necessary to implement, however, might be beneficial when
you design your own types or customize the serialization process. Especially when you want to reduce the complexity
of the resulting output file and the necessary customizations to serialize your own types.
Provide Default Values for Your Properties
A default value may be provided with GraphMLAttribute's defaultValue property
to expose their default value to reflection. The XML serializer evaluates this property and
prevents writing properties which have their default value. This significantly reduces the size of the output
file and also slightly improves the (de)serialization performance.
The following examples show how to annotate different types of properties:
Annotating ECMAScript Level 5 classes
When your classes are defined with the older yFiles class syntax, you can provide GraphMLAttributes as in the following snippet.