Hi All,
Can some point me where i can find examples on how to use mir-ion YAML
From,
Vino.B
April 12, 2023 Mir-ion:YAML Example | ||||
---|---|---|---|---|
| ||||
Hi All, Can some point me where i can find examples on how to use mir-ion YAML From, |
April 12, 2023 Re: Mir-ion:YAML Example | ||||
---|---|---|---|---|
| ||||
Posted in reply to Vino | On Wednesday, 12 April 2023 at 12:00:14 UTC, Vino wrote: >Hi All, Can some point me where i can find examples on how to use mir-ion YAML From, documentation is very sparse, but essentially with mir-ion you import the different ser/deser packages that you would like to use. If you for example want to deserialize YAML to a custom struct, you use
If you want to deserialize arbitrary values and introspect them at runtime, you use To convert algebraic values to custom structs later, you use mir.ion.conv : serde, which basically just internally serializes the data and deserializes it again (but a little more efficiently) more deserialization examples in the unittests: https://github.com/libmir/mir-ion/blob/62c476a6a00d0d5ddfb3585bdfbe520d825e872b/source/mir/deser/yaml.d and for serialization you use |