function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ 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