torrus-newfeatures icon indicating copy to clipboard operation
torrus-newfeatures copied to clipboard

RPC: timeseries as float instead of string

Open medea61 opened this issue 6 years ago • 0 comments

In this output processing you are converting values to string and take care of NaN and inifinity values:

https://github.com/ssinyagin/torrus-newfeatures/blob/c24f1d285a43331e092f209986cd87f7468d223f/src/lib/Torrus/Renderer/RPC.pm#L470

This makes consuming the values with other applications tedious, as they need to parse thru the strings and convert them back into numbers.

Suggested workaround would be to have another call or an option which could be set so the API is sending numbers while NaN and inifinity are 'null'.

medea61 avatar Mar 23 '18 21:03 medea61