Questions tagged [android-json]

JSON stands for (Java Script Object Notation). It is a simple and light-weight data interchange format that can be easily read by humans and machines.Android includes the org.json library which allow working efficiently with JSON. This provides easy parsing of JSON data and creating JSON strings

577 questions
-1
votes
1 answer

How can i toast when parsing object is not present in that parsing link?

I had done parsing using volley. What I just need is that when i parse any object like movie.setTitle(obj.getString("title")); and there is no object name in that link there should be a toast. here is my present code of parsing JsonArrayRequest…
Hitesh Matnani
  • 533
  • 2
  • 8
  • 26
-1
votes
2 answers

Trouble in parsing Json Data

I am trying to parse a JSON and fetch data When I tried to fetch data The result seems to be xml document , but in JSONLint and postman it looks fine The Code I am using is... private class DownloadJSON extends AsyncTask { …
Geethu
  • 1,586
  • 6
  • 21
  • 34
-1
votes
1 answer

Progress Bar Error

I want to parse data using JSON with showing Progress bar.This code working fine without progress Bar but when i use progress Bar then its Unfortunately Stopped!!! Here is my MainActivity.java code public class MainActivity extends Activity…
-1
votes
5 answers

get JSON value for URL and send to another intent

i am trying to fetch the json value for api. What my api is showing json as below { "resultCode": 0, "resultMessage": "Login Success", "data": { "userid": "2", "username": "abc", "email": "mrabc@abc.com", …
CHIM CHIM
  • 13
  • 1
-1
votes
2 answers

How to parse json with multiple objects in a array?

I have JSONArray having following structure: { "People":[ { "006MST21IND":{ "desc":"MST21 BAL. PR. THERMOSTATIC STEAM TRAP", "attribute":"1,b_“F”ELEMENT / c_`G' ELEMENT;2,b_“F”ELEMENT / c_`G'…
-1
votes
2 answers

how to form URL to make HTTP request in android?

I want to make a HTTP request to the url below. http://192.168.1.60/api/check/merge?nodeid=2&tickets=2-0011,2-0010&saleId=140708120131003102,140708115753005302&firsttableid=1&layoutid=1&userid=1 I stored the tickets details and sales id details in…
user3789180
  • 21
  • 1
  • 6
-1
votes
1 answer

Parcelable and JSON in android

I am working on a project where i have a URL in JSONObjects and i have to show those items in a listview with the course names being the items. When the user clicks a course name in the list, a new activity must open with the grades and the…
user3783005
  • 542
  • 1
  • 9
  • 20
-1
votes
1 answer

Simplest way to make and parse json request android

I need to use a JSON api, but don't know how to do so. All the tutorials i have found are about parsing json from a file. I need to make a request like this: http://expandurl.appspot.com/expand?url=http%3A%2F%2Ft.co%2FgLP0Ucg and then it will return…
Finley Smith
  • 1,599
  • 2
  • 11
  • 15
-1
votes
3 answers

How to fix this -> Unable to find explicit activity class

I have a fragment layout with list view from JSON, but when i click them, i got error. 06-13 13:17:58.492: E/AndroidRuntime(1542): FATAL EXCEPTION: main 06-13 13:17:58.492: E/AndroidRuntime(1542): android.content.ActivityNotFoundException: Unable to…
Andrea
  • 123
  • 1
  • 4
  • 12
-1
votes
2 answers

Parsing JSON gives error org.json.JSONException: Expected literal value

Hi i have a JSON file saved in a txt file and i am parsing it in my android code. I keep getting a JSONSyntax lateral exception. I used a json validator and my json syntax is correct. I really don't know the problem. Can someone pls help me out. I…
Shaheedah
  • 77
  • 1
  • 2
  • 11
-1
votes
1 answer

Error in sending image as part of a JSONObject from android to GAE

I need to send an image from my Android app to Google App Engine datastore. This image needs to be embedded as a Blob datatype inside a JSONObject. I am able to capture the image from the device camera and compress it to the jpg format. I then use…
EdmDroid
  • 1,350
  • 1
  • 11
  • 25
-1
votes
1 answer

how to pass url to json and show a response to listview in android,how can i show in listview

//how to pass url to json and show a response to listview in android,how can i show in listview public class MainActivity extends Activity { @SuppressLint("NewApi") @TargetApi(Build.VERSION_CODES.GINGERBREAD) @Override protected…
user3114723
  • 401
  • 1
  • 6
  • 17
-1
votes
1 answer

Deserialize JSON with Class containing Generic Object

I am using GSON to deserialize a JSON string. mGSON.fromJson(json, mClass) //mClass == ClassA.class The problem comes in when using the class below public class BaseModel { String StatusCode, Description; T Data; } I'd like to do…
MCR
  • 1,633
  • 3
  • 21
  • 36
-1
votes
1 answer

Android how i can read JSON text file from my sd card and display into my textview

I am stuck,i have a json text file in Sd Card and i need to read a json file from the SD card and display the data in to my textview. This is my json textfile name is textarabics.json: { "data": [ { "id": "1", "title": "Farhan…
Farhan Shah
  • 2,344
  • 7
  • 28
  • 54
-2
votes
1 answer

How to convert string array to json in android

Following is my JSONArray data How do I convert this to a StringArray? private void getTextfromalledittext() { String textpoint[]=new String[editTextList.size()]; int i=0; for(EditText editText:editTextList) { …