package com.gmgauthier.cucumber; import com.gmgauthier.JsonUtils; import io.cucumber.datatable.DataTable; import io.cucumber.java.en.Given; import io.cucumber.junit.platform.engine.Cucumber; import kong.unirest.json.JSONObject; @Cucumber public class MyStepDefTests { @Given("The following data in a table") public void theFollowingDataInATable(DataTable dataTable) { JSONObject dataTableAsJson = JsonUtils.getJsonFromDataTable(dataTable); System.out.println(dataTableAsJson); } }