Culture sensitive field ordering in writers/readers
Opened this issue · 0 comments
marius-klimantavicius commented
ReflectionEx orders fields using current culture (it simply uses OrderBy(s=>s.Name)
). It is possible (as I've encountered) that two different locales would result in different fields orders.
In my case lt-LT
orders y
before o
, so fields ToDate
and Type
are ordered ["Type", "ToDate"]
. In en-US, o
comes before y
, so the fields are ordered as ["ToDate", "Type"]
.
Not sure how to fix that in non-breaking manner. Locally, I just added StringComparer.Ordinal
.
Alternatively it could use manifest (if fields are listed) to generate correct reader.