cancel
Showing results for 
Search instead for 
Did you mean: 

Sender Rest Adapter- Convert XML to JSON - 1.00 value

iaki_vila
Active Contributor
0 Kudos

Hi experts.

On the sender rest adapter i have the xml value 1.00 if i set the conversion to JSON:

1. Nothing: the adapter converts it in a string, i get: "1.00".

2. Custom XML/JSON conversion Rules, type decimal or float, i get: 1
3. Custom XML/JSON conversion Rules, type decimal or float, default value 0.00, i get: 1

Is there any possibility to get the value 1.00, as a number, with the point and the decimal values?

Regards.

View Entire Topic
iaki_vila
Active Contributor
0 Kudos

Hi Liz,

I set the type as you said:

And in the Rest adapter as well:

But when the decimal value is .00, the decimal values are not showed:

In monitoring before Rest proccesing i can see the two decimal values.

What is your PI version and your PI SP?

Regards.

joan_llaully
Discoverer
0 Kudos

Hi Iñaki, did you find any solution for this? I'm having a similar problem but in receiver side. I'm sending from PI value 10.504, but after conversion in channel (using conversion XML/JSON custom rules), JSON value is 10.5

Anyone has a similar issue?

Best regards,

Joan Llaully