Javascript constraint for big numbers

Your external service returns very large numbers in JSON response ( numbers larger than 9007199254740991 (2^53-1). On postman, you are able to see proper numbers in response but in platform, you see the numbers changed/rounded off while handling the response (say in the Service node)
Any JS code will tend to round off such numbers. is built primarily on NodeJS. So this technical constraint applies to also.

Say you have a service like below (Using python just for simplicity):

from flask import Flask,jsonify

app = Flask(__name__)

def index():
    return jsonify({"entityId": 123456789012345678,"workflowId":876543210987654321})

Through postman, you should be able to see no issues in accessing this number.

But the same service may show rounded off large numbers if consumed through any JS system like this issue will be evident.


  1. In case the end API cannot be changed, we recommend that our end-user developers write a wrapper on top of the service they wanted to use. That wrapper has to convert that number to a string. In the platform, we will use it as a string and when any external service is called using this value, then again their wrapper has to convert the string into a number if needed.

  2. If there is a scope to change the third-party API, the long numbers can be avoided in such services, and string should be used. Then, there will be no such problems encountered in our platform.