Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 3 of 3

Thread: Parsing JSON Feed

  1. #1
    Junior Member
    Join Date
    Jun 2011
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Parsing JSON Feed

    For the life of me I can't figure out why this is not outputing anything.

    Any advice would be appreciated.

    Sean

     
     
      <script>
        xhttp=new XMLHttpRequest();
        xhttp.open("GET","http://biz104.inmotionhosting.com/~cox7co5/api/get_category_posts/?id=5",false);
        xhttp.send("");
        json_data=xhttp.responseText; 
        var parsed_data = eval('('+json_data+')');
    	for (i=0;i<parsed_data.count;i++) {
          document.write("<tr><td><a href=\"#\" class=\"showlist\">"+parsed_data.posts[i].title+"</a></td></tr>");
        }
    </script>


  2. #2
    Forum old-timer
    Join Date
    Nov 2008
    Location
    Faversham, Kent, UK
    Posts
    472
    My Mood
    Mellow
    Thanks
    4
    Thanked 58 Times in 54 Posts

    Default Re: Parsing JSON Feed

    Looks like Javascript to me, not Java... they're very different languages.

    Have you tried a scripting forum?

  3. #3
    mmm.. coffee JavaPF's Avatar
    Join Date
    May 2008
    Location
    United Kingdom
    Posts
    3,336
    My Mood
    Mellow
    Thanks
    258
    Thanked 294 Times in 227 Posts
    Blog Entries
    4

    Default Re: Parsing JSON Feed

    Quote Originally Posted by dlorde View Post
    Looks like Javascript to me, not Java... they're very different languages.
    Moved thread to - Other Programming Languages
    Please use [highlight=Java] code [/highlight] tags when posting your code.
    Forum Tip: Add to peoples reputation by clicking the button on their useful posts.

Similar Threads

  1. Parsing XML
    By jrookie in forum What's Wrong With My Code?
    Replies: 1
    Last Post: March 17th, 2011, 10:04 AM
  2. Validate JSON according XSD schema
    By edrozim in forum Java Theory & Questions
    Replies: 2
    Last Post: February 23rd, 2011, 10:42 AM
  3. Parsing urls
    By Riddhi Sharma in forum Java Theory & Questions
    Replies: 2
    Last Post: January 25th, 2011, 10:06 AM
  4. Help needed regarding implementing RSS feed using JSP
    By smsouvik_2008 in forum JavaServer Pages: JSP & JSTL
    Replies: 3
    Last Post: February 21st, 2010, 04:34 AM
  5. Replies: 5
    Last Post: October 12th, 2009, 12:24 AM