PlotJuggler icon indicating copy to clipboard operation
PlotJuggler copied to clipboard

NaN in JSON is not parsed correctly

Open pavel-kirienko opened this issue 3 years ago • 3 comments

Per the JSON specification, NaN floats cannot be represented natively, so many encoders substitute NaN with null. One would expect PJ to handle null values in JSON input as NaN for compatibility with this common case. Instead, we get this:

image

The JSON doc I used is:

{
  "1252": {
    "timestamp": {
      "microsecond": 0
    },
    "value": {
      "current": {
        "ampere": null
      },
      "voltage": {
        "volt": 24.852617263793945
      }
    }
  }
}

pavel-kirienko avatar May 07 '22 20:05 pavel-kirienko

I updated the JSOn parse and I think this fixed the issue

facontidavide avatar Jul 25 '22 09:07 facontidavide

@facontidavide Thanks! But the issue is still there though :D

pavel-kirienko avatar Aug 05 '22 12:08 pavel-kirienko

sorry to hear that. I will try to address it in the next release

facontidavide avatar Aug 05 '22 15:08 facontidavide

I have just tried and it works just fine image

Closing not being reproducible

facontidavide avatar Aug 10 '22 23:08 facontidavide