IoTConvert.GsmCommunicationJsonToBusinessObject expects a json formatted string as parameter.
Problem:
The methods that are called internally are using float.Parse(s) without passing InvariantCulture as NumberFormatInfo parameter so the process fails if executed on a system where the decimal separator is not a ".".
Example this happens in the (internal) CommandRuleCapitalM.ParseCurrentValuesOfSelectedChannels method
Some further thoughts:
The GsmCommunicationToJson(string) method returns numeric values as strings but should use numerics.
Example:
"F": {
"e": "0"
}
should be:
"F": {
"e": 0
}
GsmCommunicationToJson(string) should return a JObject instead of a string. Is there a reason why the methods expecting a JObject are not public?
Consequently GsmCommunicationJsonToBusinessObject should take a JObject instead of (or optionally) a string.
As a work around we can set CurrentCulture to "en-US" but would like to get rid of this as soon as possible.
In general this library is of great help to us to process files sent to us from the Keller waterlevel sensors. Thanks for that!