I have this code and I have always the same error "onError errorDetail : parseError". I have tried to send a simple JSON but it doesn't work. What could be the problem the problem in the code?
btn_ok_mois.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
//POST JSON MOIS
JSONObject jsonObjectMOIS = new JSONObject();
try {
String valueMinMois = et_min_mois.getText().toString();
int finalvalueMinMois = Integer.parseInt(valueMinMois);
jsonObjectMOIS.put("minMois", finalvalueMinMois);
String valueMaxMois = et_max_mois.getText().toString();
int finalvalueMaxMois = Integer.parseInt(valueMaxMois);
jsonObjectMOIS.put("maxMois", finalvalueMaxMois);
I have this code and I have always the same error "onError errorDetail : parseError". I have tried to send a simple JSON but it doesn't work. What could be the problem the problem in the code?
btn_ok_mois.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { //POST JSON MOIS JSONObject jsonObjectMOIS = new JSONObject(); try { String valueMinMois = et_min_mois.getText().toString(); int finalvalueMinMois = Integer.parseInt(valueMinMois); jsonObjectMOIS.put("minMois", finalvalueMinMois); String valueMaxMois = et_max_mois.getText().toString(); int finalvalueMaxMois = Integer.parseInt(valueMaxMois); jsonObjectMOIS.put("maxMois", finalvalueMaxMois);