static RPCMessage unmarshall(String jsonFormatString) throws IOException {
		if ( jsonFormatString == null ) throw new IOException("RPCMessage.stringToMessage was passed null");

		try {
			JSONObject jsonObj = new JSONObject(jsonFormatString);
			
			String type = jsonObj.getString("type"); 
			
			if ( type.equalsIgnoreCase("control") ) return new RPCControlMessage(jsonObj);
			if ( type.equalsIgnoreCase("invoke") )  return new RPCInvokeMessage(jsonObj);
			if ( type.equalsIgnoreCase("OK") )      return new RPCNormalResponseMessage(jsonObj);
			if ( type.equalsIgnoreCase("ERROR") )   return new RPCErrorResponseMessage(jsonObj);
			String msg = "Got unrecognized type in message: " + type + " [" + jsonFormatString + "]"; 
			Log.e(TAG, msg );
			
			throw new IOException(msg);

		} catch (JSONException je) {
			throw new IOException("Unparsable message: '" + jsonFormatString + "'");
		}
		
	}