ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » JSON Parsing error

Post new topic  Reply to topic
 JSON Parsing error « View previous topic :: View next topic » 
Author Message
MKHODER1
PostPosted: Thu May 07, 2020 12:04 pm    Post subject: JSON Parsing error Reply with quote

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
View user's profile Send private message
timber
PostPosted: Thu May 07, 2020 3:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
yshakraj
PostPosted: Thu Feb 22, 2024 7:43 am    Post subject: Reply with quote

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
View user's profile Send private message
abhi_thri
PostPosted: Fri Feb 23, 2024 1:29 am    Post subject: Reply with quote

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
View user's profile Send private message
rekarm01
PostPosted: Fri Mar 08, 2024 2:05 pm    Post subject: Reply with quote

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
View user's profile Send private message
bruce2359
PostPosted: Sun Mar 10, 2024 2:38 pm    Post subject: Re: JSON Parsing error Reply with quote

Poobah

Joined: 05 Jan 2008
Posts: 9394
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
View user's profile Send private message
joebuckeye
PostPosted: Fri Mar 15, 2024 7:56 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » JSON Parsing error
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.