Skip to content

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

@Mamtemic

Description

@Mamtemic

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions