Skip to content

[Enhancement] Standard JSONPATH-Syntax please ! #27

@MajorCGN

Description

@MajorCGN

Please use standard JSONPATH syntax.

I used an evaluated syntax on https://jsonpath.com/ on following JSON:

{
  "uuid": "a6ee8177-107b-47dd-bcfd-30960ccc6e9c",
  "number": "2730010",
  "shortname": "KÖLN",
  "longname": "KÖLN",
  "km": 688.0,
  "agency": "WSA RHEIN",
  "longitude": 6.963300159749653,
  "latitude": 50.93694925646438,
  "water": {
    "shortname": "RHEIN",
    "longname": "RHEIN"
  },
  "timeseries": [
    {
      "shortname": "W",
      "longname": "WASSERSTAND ROHDATEN",
      "unit": "cm",
      "equidistance": 15,
      "currentMeasurement": {
        "timestamp": "2021-03-28T22:00:00+02:00",
        "value": 258.0,
        "trend": 0,
        "stateMnwMhw": "normal",
        "stateNswHsw": "normal"
      },
      "gaugeZero": {
        "unit": "m. ü. NHN",
        "value": 35.038,
        "validFrom": "2019-11-01"
      }
    },
    {
      "shortname": "Q",

(...)

with $.timeseries[0].currentMeasurement.value and it worked.: 258,0 was given back. Perfect, easy, works as exprected.

Couldn't figure out, why i could not get same result for systeminfo., because it uses a "special" but not easier "version" of JSONPATH. Documentation and support are very very limited on this "special" way opposite to "real" JSONPATH. And most users do not want to learn exotic ways to get a single value from a JSON, when ther's an easier way.

"Normal" JSONPATH would have solved my simple search.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions