MapsterMapper / Mapster

A fast, fun and stimulating object to object Mapper
MIT License
4.31k stars 328 forks source link

Mapping Dictionary is changing Key Case #474

Closed OFark closed 1 year ago

OFark commented 2 years ago

If I map a dictionary with string keys to another, and I have the TypeAdapterConfig.GlobalSettings.Default.NameMatchingStrategy(NameMatchingStrategy.Flexible); setting, it's converting the dictionary keys to Title case. I can stop is doing this by using: NameMatchingStrategy.Exact setting instead.

I find this behaviour odd, It's not matching properties, when it's mapping dictionary keys, so why swap the case around in the first place?

andrerav commented 1 year ago

Probably some kind of duplicate of #388

andrerav commented 1 year ago

Fixed in #590