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 trialKevin Nguyen
617 PointsUsing your own json URL
How do I convert my own website url to a jason url?
1 Answer
Dimitris Sotiris Tsolis
28,141 PointsIt depends on the technology you used to create your website. You can use a library that might exists for this technology but even a simple string concatenation like this
var myJson = "{\"name\" : \"" + user.Username + "\"}";
would work.
If it is a wordpress website, you can simply download and activate this plugin https://wordpress.org/plugins/json-api/.