Netflix / vizceral-example

Example Vizceral app
Apache License 2.0
367 stars 164 forks source link

Interface from Go to Vizceral json format found inconsistencies #6

Closed adrianco closed 8 years ago

adrianco commented 8 years ago

I just built a first rough pass at a go package that maps the vizceral format https://github.com/adrianco/go-vizceral

I ran into an issue where "metadata" is sometimes "streaming": true, and sometimes "streaming": 1 in the example file, which causes an error when marshal/unmarshal from go. I edited a copy of the example file to use "streaming": 1 everywhere, but it would be better to fix upstream wherever this data was generated.

JSONRice commented 8 years ago

@adrianco Sounds like Go is having issues with the marshalling and unmarshalling and this is a Go specific problem, rather than a Vizceral problem as the metadata field is optional and the example file is valid JSON.

jrsquared commented 8 years ago

@jasonwr It does point out inconsistencies with how the backend was generating the data. It is a very valid issue to point out.

@adrianco Thank you for pointing this out! I have since fixed the backend data generation to be consistent and updated the the sample json in f125a2f8c82b7d76062d12162a71b1e5caba3e3b. Please let me know if you find anything else.

JSONRice commented 8 years ago

@jrsquared @adrianco My apologies! Good catch! I do know that your example data is valid JSON.

adrianco commented 8 years ago

Thanks for fixing this, I know that it is valid json, but when interfacing json to typed languages like Go it's much easier when the json types are consistent.