code: public static IDataSource create(JsonObject config) throws DataSourceCreationException {
          String title = config.getAsJsonPrimitive("title").getAsString();
          String description = config.getAsJsonPrimitive("description").getAsString();
          String typeName = config.getAsJsonPrimitive("type").getAsString();
          
          JsonObject settings = config.getAsJsonObject("settings");
  
          final IDataSourceType type = DataSourceTypesRegistry.getType(typeName);
          if ( type == null )
              throw new UnknownDataSourceTypeException(typeName);
  
          return type.createDataSource( title, description, settings );
      }
docs: Create a datasource using a JSON config
  
  @param config
  @return datasource interface
  @throws DataSourceCreationException