Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decoding Array types in javascript sparkplug-payload #317

Open
Jocke-G opened this issue Sep 21, 2023 · 0 comments
Open

Decoding Array types in javascript sparkplug-payload #317

Jocke-G opened this issue Sep 21, 2023 · 0 comments

Comments

@Jocke-G
Copy link

Jocke-G commented Sep 21, 2023

The javascript/typescript library is missing support to decode metrics of array types. When trying to decode payload containing a metric with type StringArray, value will be decoded to null, and no type is set on the metric.

Stackblitz

{
  "timestamp": 1672576620000,
  "metrics": [
    {
      "name": "StringArray-Metric",
      "timestamp": 1672576620000,
      "type": "StringArray",
      "value": [
        "abc",
        "bca"
      ]
    }
  ],
  "seq": 1
}
{
  "timestamp": 1672576620000,
  "metrics": [
    {
      "value": null,
      "name": "StringArray-Metric",
      "timestamp": 1672576620000
    }
  ],
  "seq": 1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant