Code example for JsonParser

Methods: parse

0
	public void DEBUG(String str){
		if(DEBUG)
			System.out.println(str);
	} 
	public JsonObject getFrom(String str){
		JsonParser parse = new JsonParser();
		JsonElement e = parse.parse(str);
		return e.getAsJsonObject();
	} 
	public JsonObject read(Socket s) throws IOException, SocketException{
		InputStream in = s.getInputStream();
		BufferedReader rdr = new BufferedReader(new InputStreamReader(in));
		String str;
		do{ 
			str = rdr.readLine();
		}while(str == null);
		 
		return getFrom(str);
	} 
	 
Connect your IDE to all the code out there  Get Codota for Java