Error parsing WordPress JSON To Android App

193 views Asked by At

In a dilemma. Few days ago I dove into wordpress rest API and thereafter made an android app to parse the feed into a list view. Parsing from the website is smooth but then I thought 'mimicking' the feed into a file and parsing the data from this .json file hosted online.

I get this error:

enter image description here

Please help me get to know why the second way is giving me a NullPointerException.

The JSON feed is basic as any other wp rest say, http://updates.collegespace.in/wp-json/posts/ which for demonstration, made it into a .json file https://rawgit.com/ErickPaul/AppData/master/UBC.json

Also here's my doInBackground()

enter image description here

Thanks...

1

There are 1 answers

0
ErickPaul On

After quite a number of tries, I succeded by eliminating the .json extension in file.json and just let the JSONparser get the feed from url.filename rather than url.filename.json.

Thanks everyone.