그러나 내가 제대로 데이터를 보내거나받을 수없는 것 수있는 Clojure의/compojure 서버에 안드로이드에서 일부 JSON 데이터를 전송하기 위해 노력하고있어에서 서버를 compojure, 내가하는 문제가 Android 나 compojure에 있는지 잘 모르겠습니다. 여기
는 자바 코드 형학는 JSON 객체입니다String PATH = "http://localhost:8080/get_position";
DefaultHttpClient mClient = new DefaultHttpClient();
HttpGet httpget = new HttpGet(PATH);
HttpResponse response;
httpget.getParams().setParameter("measurements", measurements.toString());
response = mClient.execute(httpget);
HttpEntity entity = response.getEntity();
입니다.
그리고 요청이 제대로 수신 라우팅
(defroutes main-routes
(POST "/get_position" {params :params}
(emit-json (find-location (:results (read-json (:measurements params))))))
(route/not-found "Page not found"))
을 처리하기위한 주요 compojure 코드,하지만
java.lang.IllegalArgumentException: No implementation of method: :read-json-from of protocol: #'clojure.data.json/Read-JSON-From found for class: nil
사람이 코드에 문제가 있음을 볼 수 있습니까 전무 나는 PARAMS 오류는받을 또는이를 수행하는 올바른 방법을 알고 있습니까?