When serializing and deserializing to/from JSON we need to explicitly write nulls.
Because for development/editing we need to differentiate the following cases:
1. JSON is of an older version (field missing) -> initialize with code defined default
2. JSON is of the current version and field is actually null -> initialize with null
For networking we don't need to differentiate between those cases since client and server have the same version of the code at runtime.
So in networking case we can omit nulls from the JSON and skip all of these:
```
"OnComponentDestroy": null,
"OnComponentDisabled": null,
"OnComponentEnabled": null,
"OnComponentFixedUpdate": null,
"OnComponentStart": null,
"OnComponentUpdate": null,
"OnPropBreak": null,
"OnPropTakeDamage": null,
```
However, this wont reduce the amount of data that ends up on the wire, because compression already does a good job at deduplicating those strings.
```
Raw JSON with nulls : 41Kb
Raw JSON skip nulls : 27Kb (13Kb saved, 33.6% smaller, 1.51x ratio)
LZ4 fast with nulls : 7Kb (34Kb saved, 81.9% smaller, 5.54x ratio)
LZ4 fast skip nulls : 7Kb (34Kb saved, 82.6% smaller, 5.76x ratio)
```
The main benefit instead comes from saving CPU resources as this makes compression/decompression faster, because there is less data to process.
```
LZ4 with nulls compress : 0.210 ms/op
LZ4 with nulls decomp : 0.232 ms/op
LZ4 skip nulls compress : 0.165 ms/op
LZ4 skip nulls decomp : 0.074 ms/op
```