FileMaker-JSON icon indicating copy to clipboard operation
FileMaker-JSON copied to clipboard

bug in cf z_jsonParseSupport1 with files created with non english system settings

Open Mamtemic opened this issue 9 years ago • 0 comments

I found a bug in your custom function z_jsonParseSupport1 at least when used with files CREATED with non english system settings:

jsonGet doesn´t work with floating point numbers.

Instead of 19.3277310924 the result is 193277310924 (the decimal point is missing)

It was difficult to find the point, as your file (created on an english system, I assume) works. (So does a file I created on with a different Mac OS X User with complete english settings at time of file creation)

What I have done:

  1. Created a new file (1x on a german system / 1 x on an english system)
  2. copied all custom functions from your FileMaker-JSON-Functions.fmp12
  3. Run “Evaluate”

Result:

German file: 193277310924 English file: 19.3277310924

To correct this misbehavior theres a change in function id 130 needed:

Somewhere below stands

GetAsNumber ($~json.text) change this to GetAsText ($~json.text)

I think there must be a reason for GetAsNumber (probably further calculations with the result), so: Is it save to change "GetAsNumber" to "GetAsText"?

Mamtemic avatar Nov 21 '16 10:11 Mamtemic