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

Proper data-type handling for large powers of 10 in JSON.Merge #22

Open
steve-ssh opened this issue Nov 26, 2018 · 0 comments
Open

Proper data-type handling for large powers of 10 in JSON.Merge #22

steve-ssh opened this issue Nov 26, 2018 · 0 comments

Comments

@steve-ssh
Copy link

JSON.Merge inserts numeric values which are large powers of 10 into the target as data-type JSONString instead of JSONNumber.

This seems to be due to a FMP nuance whereby JSONGetElement returns certain exp values in a format which differs from GetAsNumber, thus throwing off the "Is-A-Number" test that is based on comparison between GetAsNumber( v ) = GetAsText(v).

Test cases for a simple example have been added to the attached file.

Also included is a variant of the CF with possible fix (JSON.Merge_VAR).

The fix passes all tests assigned to JSON.Merge. That said, there may be a more elegant fix.

Hope this helps & thanks.

JSONAdditions_VAR_20181126_0700.fmp12.zip

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