get request returning JSON

Would someone be able to provide a sample API get request and how you assure JSON is returned instead of xml?

4 Replies
  • We don't explicitly support JSON as a return type for our services if you're accessing them directly. It's an option through YQL, though, if you choose to use that set of YQL tables. If you do use the YQL tables, though, you'll be somewhat more limited in what you're able to do.
  • Im confused.. I am trying YQL to get simple data but it doesn't work. After oauth, my code is like:

    <script src='http://query.yahooapis.com/v1/yql?q=select%20*%20from%20fantasysports.games%20where%20game_key%3D%22238%22&format=json&diagnostics=true&callback=top_stories'></script> </html>

    If there is another way, like for instance, issue a HTTP request, so what's the format then, could u give show an example?

  • <script type="text/javascript">
          function top_stories(o){
  • the top_stories(o) is from YQL tutorial, only purpose is parse the JSON response ..



Recent Posts

in Fantasy Sports API