torrus-newfeatures
torrus-newfeatures copied to clipboard
RPC: timeseries as float instead of string
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'.