Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

WordPress How to Build a WordPress Plugin Connecting WordPress Plugins with 3rd Party APIs Parsing JSON with PHP Quiz

Juliette Tworsey
seal-mask
.a{fill-rule:evenodd;}techdegree seal-36
Juliette Tworsey
Front End Web Development Techdegree Graduate 32,425 Points

Wordpress parse JSON function

Does anyone know which function to use to parse JSON in Wordpress?

I thought that it was either wp_remote_get(); or json_decode();, but neither will let me pass the quiz that I am taking.

Thanks!

1 Answer

Craig Watson
Craig Watson
27,930 Points

Hi Juliette,

As far as im aware when I did the course on creating a plugin for the WordPress badges I used json_decode()

Did you try passing the answers without the semi-colon?

So answer = json_decode() Not = json_decode();

Craig