Nuget setValue for structured event

I’m implementing tracking in .NET 4.8.1 using the latest NuGet package. I discovered that I’m not able to set my CultureInvariant correctly when creating an object of type Snowplow.Tracker.Models.Events.Structured. The issue is when calling the .SetValue(double value). As a Norwegian user with Norwegian thousand and decimal separators differently, these are sent as e.g: 7,5 instead of 7.5, leading to a problem in our cloud storage. As I examined the code, I see that upon retrieving the Snowplow.Tracker.Models.Events.Payload() the value is parsed to a string, without the ability to enforce CultureInvariant. I have a hard time figuring out how to solve this problem. Any thoughts? What can I do differently?

Hi @Arnt_Gronas,

Thanks for reporting this! I’ll make an issue for us to look at it.

In the meantime, I think what you could do is to subclass the Structured class and override the GetPayload method. In there you would call the parent GetPayload and then add the correctly formatted value with enforced CultureInvariant.

Does that make sense?

Thanx for your swift reply, and feedback concerning the issue. I get what you’re saying.