次のjson文字列をJSONObject
androidに変換しようとしています。しかし、それはスローしJSONException
ます。私は過去数時間、自分の心を掘り下げてきました。助けてください。
JSON 文字列:
parseExchangeRate({"query":
{"count":1,"created":"2012-09-07T18:49:32Z","lang":"en-US","results":
{"row":{"rate":"55.395","name":"USD to INR"}}}});
例外:
Value <jsonobject>parseExchangeRate( of type java.lang.String cannot be converted to JSONObject
コード :
String result = convertStreamToString(instream);
Log.d(TAG, result); //this outputs the above stated string
JSONObject json = new JSONObject(result); // this line thows exception
前もって感謝します。