I am trying to pass parameter to api using JSON.
class Sample
{ ...
String token;
...
void method()
{ ...
JSONObject params = new JSONObject();
params.put(KEY_TOKEN,token);
params.put(KEY_DATE,date);
Log.e("params ",params+"");
... }
I get the value of params as {"date":"2017-06-19"}
but token is seen nowhere.
I have not initialized token and its value is null as its an instance variable. So is it something that uninitialized value are not included?