cortoproject / corto

A hierarchical object store for connecting realtime machine data with web applications, historians & more
https://www.corto.io
MIT License
86 stars 14 forks source link

Add a strict option for serializers #674

Open SanderMertens opened 6 years ago

SanderMertens commented 6 years ago

By default, serializers ignore fields that they don't recognize. This allows for parsing serialized data that contains fields that are not required by the process in which it is deserialized.

In some scenarios however, serialized data is created specifically for a process (like a configuration file) and when it contains a field that is not recognized, it likely indicates an error. To make it easier to detect errors in these scenarios, serializers should be stricter.

To accommodate for this, the serializer framework should allow to either be strict or not.