Hi,
Found a little mistake in the docs. Trying to access GetField on the parameter not the row itself.
Map(m => m.Json).Convert(row => JsonConvert.DeserializeObject<Json>(row.GetField("Json")));
Should be something like:
Map(m => m.Json).Convert(o=> JsonConvert.DeserializeObject<Json>(o.Row.GetField("Json")));
Hi, Found a little mistake in the docs. Trying to access GetField on the parameter not the row itself.
Map(m => m.Json).Convert(row => JsonConvert.DeserializeObject<Json>(row.GetField("Json")));
Should be something like:
Map(m => m.Json).Convert(o=> JsonConvert.DeserializeObject<Json>(o.Row.GetField("Json")));
https://joshclose.github.io/CsvHelper/examples/configuration/class-maps/inline-type-conversion/
Thanks!