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

Fix parsing error when self describing data is not a map #41

Closed
adatzer opened this issue Feb 9, 2023 · 1 comment
Closed

Fix parsing error when self describing data is not a map #41

adatzer opened this issue Feb 9, 2023 · 1 comment

Comments

@adatzer
Copy link

adatzer commented Feb 9, 2023

Currently, the type assumed for Data in SelfDescribingData struct is a map.
This results in error (Error unmarshaling context JSON) when trying to parse unstruct events or contexts having a different type (e.g. json array) for their data.
Error can be reproduced in tests when replacing the contextString with something like:

var contextsString = `{"schema":"iglu:com.snowplowanalytics.snowplow/contexts/jsonschema/1-0-0","data":[{"schema":"iglu:com.acme.test/testing/jsonschema/1-0-0","data":["aa","bb"]}]}`
@colmsnowplow
Copy link
Collaborator

Thanks for raising - according to our documentation, arrays at the top level aren't valid. The do pass validation, but I consider that to be the problem underlying this issue. I've created a ticket against the enrich repo: snowplow/enrich#749

Closing this one

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

2 participants