Questioner
Questioner

Reputation: 715

JsonObject jar file

I imported the following imports to my code, however I still get an error for

JsonObject obj = new JsonParser().parse(input).getAsJsonObject();

"JsonObject cannot be resolved for a type."

import org.json.simple.JSONArray;
import org.json.simple.JSONObject;
import org.json.simple.parser.JSONParser;
import org.json.simple.parser.ParseException;
import org.json.JSONArray.*;
import org.json.JSONException;
import org.json.JSONObject.*;
import org.json.JSONString;

Upvotes: 0

Views: 2315

Answers (1)

N.K
N.K

Reputation: 1690

Its JSONObject not JsonObject.

Same goes for the parser, it's JSONParser not JsonParser.

JSON is always uppercase.

Upvotes: 4

Related Questions