Code example for JsonSyntaxException

0
		group = PeerGroupID.NULL;
		peer = peerid;
	} 
	 
	private Message(String msg) throws JsonSyntaxException{
		JsonParser parser = new JsonParser();
		JsonObject json = (JsonObject) parser.parse(msg);
		conversationID = new ConversationID(json.get(TAG_ID).getAsString());
		date = json.get(TAG_DATE).getAsLong();
		group = new PeerGroupID(json.get(TAG_GROUP).getAsString());
		peer = new PeerID(json.get(TAG_PEER_ID).getAsString());
		encodedContent = json.get(TAG_DATA).getAsString();
	} 
 
	public void decrypt(Key key) throws InvalidKeyException {
		String decodedContent = encodedContent;
		if(key!=null){
			decodedContent = CryptionUtil.decrypt(key, encodedContent);
		}