private void parseObjectFromFile( final File file )
	{
		int pos = file.getName().lastIndexOf( "." );
		String name = pos > 0 ? file.getName().substring( 0, pos ) : file.getName();

		if (!file.getName().endsWith( ".json" ))
			return;

		System.out.println("Trying to parse " + file.getName());

		try
		{
			JsonObject json = Util.getJsonFromFile( file.getPath() );

			boolean containsFields = json.names().contains( "fields" );
			boolean containsSelects = json.names().contains( "selects" );

			if ( containsFields )
			{
				parseTableFromFile( json, name );
			} else if ( containsSelects )
			{
				parseViewFromFile( json, name );
			} else
			{
				System.err.println( "The object " + name + " contains no valid data. I can not guess if this is a table or a view." );
				System.exit( 1 );
			}
		} catch ( ParserException pex )
		{
			System.err.println( "The object " + name + " is not the parsable structure i expect it to be. Reason : " + pex.getMessage() );
			System.exit( 1 );
		} catch ( UnsupportedOperationException uoex )
		{
			System.err.println( "The object " + name + " is not the parsable structure i expect it to be. Reason : " + uoex.getMessage() );
			System.exit( 1 );
		} catch ( Exception ex )
		{
			ex.printStackTrace();
			System.err.println( "The object " + name + " is not the parsable structure i expect it to be, please make sure it's valid json, and see formatting guidelines." );
			System.exit( 1 );
		}
	}