dymaptic / GeoBlazor

Core Components for the Dymaptic GeoBlazor Library
MIT License
109 stars 19 forks source link

Number attribute serialization still broken for non-EN locales #358

Closed TimPurdum closed 2 months ago

TimPurdum commented 3 months ago

319 attempted to fix localization of numbers serialized as attributes. However, we discovered that it was still broken, and the underlying reason is that we have to pass all attributes as strings with a valueType in protobuf serialization. This creates a string representation with a default period decimal delimiter, but in a Norwegian or other non-English server, the AttributesDictionary deserialization tries to parse and expects a comma-delimiter instead.

The correct fix should be to use CultureInfo.InvariantCulture when deserializing and parsing numbers and dates.