private void checkVersion( JSONRPCRequest request ) 
	throws JSONRPCException,
	       JSONException {
	
	// Check version
	if( request.getVersion() == null )
	    throwJSONRPCException( "version is not present." );
	
	if( request.getVersion().isNull() )
	    throwJSONRPCException( "version is not specified." );
      
	
	// Due to the specification the version number should be EXACTLY "2.0" (a string!)
	try {
	    if( !request.getVersion().asJSONString().getString().equals("2.0") ) {
		
		// Catch a regular JSON exception (=type exception)
		throwJSONRPCException( "bad version: '" + request.getVersion().getNumber().toString() + "'." );
		
	    }
	} catch( JSONException e ) {
	    throwJSONRPCException( "bad version datatype." );
	}
	
    }