grafana / grafana-foundation-sdk

A set of tools, types and libraries for building and manipulating Grafana objects.
https://grafana.github.io/grafana-foundation-sdk/
Apache License 2.0
49 stars 1 forks source link

Table builder MarshalJSON error #50

Closed hallum closed 7 months ago

hallum commented 8 months ago

I tried adding a Table to a dashboard and had the following error during the build

json: error calling MarshalJSON for type dashboard.PanelOrRowPanel: json: error calling MarshalJSON for type common.TableAutoCellOptionsOrTableSparklineCellOptionsOrTableBarGaugeCellOptionsOrTableColoredBackgroundCellOptionsOrTableColorTextCellOptionsOrTableImageCellOptionsOrTableDataLinksCellOptionsOrTableJsonViewCellOptions: unexpected end of JSON input

Sample Table usage which triggers the error:

WithPanel(table.NewPanelBuilder().Title("table")).

The cell option struct in the error was composed of pointers and the json for each field had omitempty. I wanted to see if there additional options which are expected to create a table?

K-Phoen commented 8 months ago

Thanks for reporting this, I'll look into it and come back to you once I have more info :)

K-Phoen commented 7 months ago

A fix was released today :)