Create JSON fails with negative input values

Hi,

The ‘create JSON’ module fails on negative numbers when creating the JSON.

Error as follows:

BundleValidationError

Validation failed for 1 parameter(s).

  • Invalid number in parameter ‘Amount’.

The number is appearing in the datastore module when called as 2s 31 33 2e 33 36, and when looking in the actual datastore itself it’s displayed as [object Object]

This seems to be quite a common theme elsewhere when using JSON and is apparently something to do with character encoding. Is a fix possible or anyone knows a work around?

Thanks!

1 Like

For some reason prior to creating the JSON the datastore was interpreting a negative number as a date. After using parsenumber without making any changes to it before adding the entry to the datastore, the problem was solved.

3 Likes

Hi @1cloud
Glad to know you resolved the issue yourself.

Best regards,
Msquare Automation
Platinum Partner of Make
@Msquare_Automation

1 Like