RESOLVED ISSUE. It turns out my variable jnow was not initialized
correctly.

Thanks for all those who helped rattle my grey matter.
=====================================================

On Oct 25, 12:51 am, Capt Spaghetti <gene_august...@msn.com> wrote:
> I appreciate your assitance. I removed the "System.out.println(jnow);"
> statement from my program and I modified the server side php to
> eliminate the first line and then I stepped through the program and
> followed the Variables. When it grabs the data it is only grabbing the
> data I need with "echo(json_encode($output));" as seen below in the
> "line" variable and the count of 110 seems to be correct. It still
> gives me the "Error parsing data org.json.JSONException" as seen in
> the LogCat output following the variable list.
>
> Variable List from "(x)=Variables" tab in debugger
> ==================================================
>
> this    SelectLocation  (id=830066536112)
> savedInstanceState      null
> NL      "\n" (id=830002529536)
> line    "[{"org_id":"39575","clubname":"ARTHRITIS FOUNDATION - VIRGINIA
> CHAPTER","orgcity":"RICHMOND","orgstate":"VA"}]" (id=830066867472)
>         count   110
>         hashCode        0
>         offset  0
>         value    (id=830066866672)
> sb      StringBuffer  (id=830066866112)
> client  DefaultHttpClient  (id=830066537776)
> in      BufferedReader  (id=830066839840)
> request HttpGet  (id=830066541784)
> response        BasicHttpResponse  (id=830066644096)
>
> LogCat output from LogCat tab in debugger.
> ==========================================
>
> 10-25 00:40:47.028: INFO/ActivityManager(53): Starting activity:
> Intent { cmp=com.oys.gfa.acecapper/.SelectLocation }
> 10-25 00:40:51.057: INFO/global(238): Default buffer size used in
> BufferedReader constructor. It would be better to be explicit if an 8k-
> char buffer is required.
> 10-25 00:40:51.087: INFO/log_tag(238): jnow:
> [{"org_id":"39575","clubname":"ARTHRITIS FOUNDATION - VIRGINIA
> CHAPTER","orgcity":"RICHMOND","orgstate":"VA"}]
> 10-25 00:40:51.087: INFO/log_tag(238): herenow: 0
> 10-25 00:40:54.247: ERROR/log_tag(238): Error parsing data
> org.json.JSONException: A JSONArray text must start with '[' at
> character 0 of
> 10-25 00:40:54.867: INFO/ActivityManager(53): Displayed activity
> com.oys.gfa.acecapper/.SelectLocation: 7805 ms (total 7805 ms)
>
> I must be doing something wrong but I still can't figure out what.
>
> Thanks
> ================
>
> On Oct 23, 11:49 pm, Frank Weiss <fewe...@gmail.com> wrote:
>
>
>
> > I was trying to get you to use the very nice Java debugger that comes with
> > Eclipse to see what's going on inside your code instead of
> > System.out.println(jnow); You could then simply inpect the value of the jnow
> > variable in the debugger.
>
> > Another tip is to set jnow to the string value you are expecting from the
> > server and see if the JSON library error still occurs.
>
> > It would also help if you get the server side code correct, so it doesn't
> > put anything before the first "[". You can easily test that part with a
> > browser, wget, or curl.- Hide quoted text -
>
> - Show quoted text -

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to