AnsweredAssumed Answered

Decimal issue with PI Web API response

Question asked by Kiran324 on Nov 5, 2020
Latest reply on Nov 9, 2020 by Kiran324

I am using PI Web API to stream PI AF data.

There is a requirement that certain numbers should be shown with 2 decimal places.

I configured those AF attributes with  "DisplayDigits"="2".

On AF these show correct result. Eg- 0.53, 0.23, 0.20 etc.

But when queried through PI Web API, the JSON response shows a single digit after decimal in cases where the number has "0" as the 2nd digit after decimal.



0.53 is shown as 0.53 in the response.

0.23 is shown as 0.23 in the response. But,

0.20 is shown as 0.2 in the response.


Is there any reason behind this? We would like to have 0.20 in the response instead of 0.2.


Dear experts, would like to hear out your advice on this.



Kiran Rao