This PR implements an initial version of the decoder. It decodes the returned PKL objects into an instance of the type passed to Decoder.Evaluate[...].
Things to consider:
Currently uses reflection to map typed object properties.
Ends up boxing value types due to returning object? from DecodeAny.
Decoding maps is not implemented yet. Maps only decode to Dicionary<K, V> and Lists only decode to T[].
To prevent value types from being boxed and have an alterative to using reflection, I'm thinking of providing an option to use a source generator to generate a custom decoder for each type that maps to a pkl module in the future.
This PR implements an initial version of the decoder. It decodes the returned PKL objects into an instance of the type passed to Decoder.Evaluate[...].
Things to consider:
object?
fromDecodeAny
.Decoding maps is not implemented yet.Maps only decode to Dicionary<K, V> and Lists only decode to T[].To prevent value types from being boxed and have an alterative to using reflection, I'm thinking of providing an option to use a source generator to generate a custom decoder for each type that maps to a pkl module in the future.