+ Start a Discussion
sridevisridevi 

how to solve this error The method parse(String) is undefined for the type JSON

Hi All,

 

 

DefaultHttpClient client = new DefaultHttpClient();

HttpPost oauthPost = new HttpPost(baseUrl);

HttpResponse response = client.execute(oauthPost);

int code = response.getStatusLine().getStatusCode();

Map<String, String> oauthLoginResponse = (Map<String, String>) JSON.parse(EntityUtils
.toString(response.getEntity()));

 

eclipse show the error The method parse(String) is undefined for the type JSON

 

plz need help

_Prasu__Prasu_
Are you using any existing code? May be you are missing references needed for using them.
sridevisridevi

yes im using sample code , no missing references