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

JSON which is an array #40

Open
kirkins opened this issue Mar 1, 2020 · 3 comments
Open

JSON which is an array #40

kirkins opened this issue Mar 1, 2020 · 3 comments

Comments

@kirkins
Copy link

kirkins commented Mar 1, 2020

Trying to convert JSON which is an array rather than a single object and I get back the following error:

ERROR Decoding JSON at line 1: json: cannot unmarshal array into Go value of type map[string]interface {}

Source of data https://pressbooks.online.ucf.edu/wp-json/pressbooks/v2/books/

@joacole
Copy link

joacole commented Mar 23, 2020

I'm having this issue as well. Any ideas how to fix it? Thanks!

@kirkins
Copy link
Author

kirkins commented Mar 23, 2020

@joacole in my case I used a custom jq command instead

https://unix.stackexchange.com/q/570548/16792

@joacole
Copy link

joacole commented Mar 23, 2020

@kirkins Thanks. I think I'm going to have to do that as well until this is fixed.

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