Author |
Message
|
MKHODER1 |
Posted: Thu May 07, 2020 12:04 pm Post subject: JSON Parsing error |
|
|
Apprentice
Joined: 18 Aug 2018 Posts: 31
|
Hi everyone,
I call a webservice via the httpRequest neoud, the backend returns an amount, the type of the amount is BigDecimal with 36 digits after the decimal point (Ex: -689.143550568954437010030942347717800000).
The format of the response is JSON, I have selected the response property parsing JSON and at the output of the httpRequest node a parsing error Too many digits in coefficient.
I added the environment variable MQSI_JSON_NUMBER_PRECISION_TYPE = DECIMAL, I restart the integration node then I tested and I still have the same error.
Has anyone ever had the same use case or error ?
Many thanks |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
timber |
Posted: Thu May 07, 2020 3:49 pm Post subject: |
|
|
![](images/avatars/53508560955fb354bd4bd0.jpg) Grand Master
Joined: 25 Aug 2015 Posts: 1280
|
No, and there is no evidence on the internet that anybody else has encountered that error.
36 digits of precision is far more than any business scenario could ever require, so I'm not surprised that it's a rare requirement. If the requirement is genuine, and if you _must_ deal with this as a number, then I suggest that you open a ticket with IBM and see if there is a workaround. |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
yshakraj |
Posted: Thu Feb 22, 2024 7:43 am Post subject: |
|
|
![](images/avatars/gallery/misc/5.gif) Voyager
Joined: 14 Sep 2011 Posts: 90
|
Hi All,
Is there any work around for this scenario ?
we have a case like below with a field with almost 50 digit precision and its failing in parsing in HTTP request node .
Thanks in advance ,
yshakraj |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
abhi_thri |
Posted: Fri Feb 23, 2024 1:29 am Post subject: |
|
|
![](images/avatars/3159673415d820d89ea89a.jpg) Knight
Joined: 17 Jul 2017 Posts: 516 Location: UK
|
hi there...value with 50 digit precision sounds bit unrealistic, try requesting the source system to reduce the precision to a more realistic value with say 2 or 3 digit precision |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
rekarm01 |
Posted: Fri Mar 08, 2024 2:05 pm Post subject: |
|
|
Grand Master
Joined: 25 Jun 2008 Posts: 1415
|
For ace12, the server.conf.yaml file provides a JSON parser property, 'numberPrecisionType', (instead of an environment variable), to map precision numbers to either 'default' (ESQL FLOAT?) or 'decimal' (ESQL DECIMAL?).
However, the maximum precision for ESQL DECIMAL is still only 34 digits. |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
bruce2359 |
Posted: Sun Mar 10, 2024 2:38 pm Post subject: Re: JSON Parsing error |
|
|
![](images/avatars/58715422151eef88d5f6e3.jpg) Poobah
Joined: 05 Jan 2008 Posts: 9403 Location: US: west coast, almost. Otherwise, enroute.
|
MKHODER1 wrote: |
I call a webservice via the httpRequest neoud, the backend returns an amount, the type of the amount is BigDecimal with 36 digits after the decimal point (Ex: -689.143550568954437010030942347717800000). |
How has the webservice node that creates the value defined the returned variable?
How have you defined the variable that holds the returned value? _________________ I like deadlines. I like to wave as they pass by.
ב''ה
Lex Orandi, Lex Credendi, Lex Vivendi. As we Worship, So we Believe, So we Live. |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
joebuckeye |
Posted: Fri Mar 15, 2024 7:56 am Post subject: |
|
|
![](images/avatars/19029967664f35568c654b0.jpg) Partisan
Joined: 24 Aug 2007 Posts: 364 Location: Columbus, OH
|
With a ridiculous "number" like that it would be better to pass it around as a string and then let the systems that care about it as a number and can presumably handle a number of that precision worry about converting it to an actual numeric data type. |
|
Back to top |
|
![](templates/DAJ_Glass/images/spacer.gif) |
|