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

Strings Are Double Quoted #36

Open
camrossi opened this issue Nov 19, 2024 · 0 comments
Open

Strings Are Double Quoted #36

camrossi opened this issue Nov 19, 2024 · 0 comments

Comments

@camrossi
Copy link

Currently the data returned is erroneously double quoted for example

"{\"Id\":171,\"ElementId\":\"4:8425adf4-ce01-4991-ab7f-5b3261989058:171\",\"Labels\":[\"Movie\"],\"Props\":{\"color\":\"green\",\"icon\":\"camera\",\"released\":1999,\"tagline\":\"Welcome to the Real World\",\"title\":\"The Matrix\"}}"

This is not an issue until you add support for Optional fields (that I am working on) and then things like icons or colours fails to render.

I am not a go programmer and I am not fully understanding how you build grafana plugins but I could fix it by simply doing:

func asJson(val interface{}) *string {
	res = fmt.Sprint(val)
	return &res
}

I am not sure why in the first place the code was Marshalling Json here.

camrossi added a commit to camrossi/grafana-datasource-plugin-neo4j that referenced this issue Nov 19, 2024
camrossi added a commit to camrossi/grafana-datasource-plugin-neo4j that referenced this issue Nov 19, 2024
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