-
Notifications
You must be signed in to change notification settings - Fork 14
Description
Hi
We have an issue with one of our shims that is somehow creating invalid JSON out of HCHOST.DBR. It only happens when logging into a certain company in our software so we think it's data related but no idea what is going on. We have pulled the JSON from the BRIDGE log files as below.
We have three d1 fields and on our main company they return like this.......
{"Position":9,"Value":{"DataType":4,"ElementSize":1,"DecimalPrecision":0,"PassedValue":0.0}},
{"Position":10,"Value":{"DataType":4,"ElementSize":1,"DecimalPrecision":0,"PassedValue":0.0}},
{"Position":11,"Value":{"DataType":1,"PassedValue":"RME"}},
{"Position":12,"Value":{"DataType":4,"ElementSize":1,"DecimalPrecision":0,"PassedValue":1.0}}
As you can see, position 9, 11 and 12 all return with one decimal place. This works fine.
The problem is on the other company, it returns like this......
{"Position":9,"Value":{"DataType":4,"ElementSize":1,"DecimalPrecision":0,"PassedValue":0,0}},
{"Position":10,"Value":{"DataType":4,"ElementSize":1,"DecimalPrecision":0,"PassedValue":0,0}},
{"Position":11,"Value":{"DataType":1,"PassedValue":"BRI"}},
{"Position":12,"Value":{"DataType":4,"ElementSize":1,"DecimalPrecision":0,"PassedValue":1,0}}
Those d1 values are now returning with a comma instead of decimal point so this is breaking the JSON.
I wondered if it's somehow getting the comma as its a European company and we may have formatting somewhere that uses comma instead of decimal point. This could be a red herring and as it's a d1 I don't understand how it's even getting the decimal point. We have debugged the shim on both companies and it always returns a d1 either 0 or 1.
Any ideas where I can start looking please as we are out of ideas?
Thanks