Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Mamtemic opened this issue Nov 21, 2016 · 0 comments

Comments

@Mamtemic
Copy link

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"?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant