The processing of the Legivel Mapper should be configurable with attributes and processing options.
The following options are desired:
- Use default value if missing. ie a missing mandatory int should get value 0, a missing string should get an empty string (!)
The following attributes are desired:
- Attribute in which one can define a default value on a field, in case of a missing value
The following Yaml must be mapped to a DU's Union Cases, with containing data:
Implementation is tricky; probably requires a dedicated list-of-DU mapper.
- FSharp Map
- FSharp Set (using YamlExtended tag "!!set"?)
- Tuples? (not sure about this one)
This library currently supports net461, obviously it should also support netstandard16 or something higher.
Currently, Legivel only supports Yaml parsing. The Legivel.Parser also has a ToCanonical serializer, but this is in machine format, not in human-readable format. This feature should be taken into two steps, in the Legivel.Mapper a mapper must convert native to the generic format, and the Legivel.Parser should get the generic to readable string function. Adding this feature contradicts "Parser" in the name Legivel.Parser, but let's solve that naming problem later.