Skip to content

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

@steve-ssh

Description

@steve-ssh

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions