Skip to content

Instantly share code, notes, and snippets.

@borodicht
Created January 12, 2026 09:12
Show Gist options
  • Select an option

  • Save borodicht/1cd4ff52ae01af9d05a51e37b1df6d13 to your computer and use it in GitHub Desktop.

Select an option

Save borodicht/1cd4ff52ae01af9d05a51e37b1df6d13 to your computer and use it in GitHub Desktop.
import com.fasterxml.jackson.databind.ObjectMapper;
import model.TestSuite;
import java.nio.file.Files;
import java.nio.file.Path;
public class TestcasesParser {
public static TestSuite parse(String path) {
try {
String json = Files.readString(Path.of(path));
ObjectMapper mapper = new ObjectMapper();
return mapper.readValue(json, TestSuite.class);
} catch (Exception e) {
throw new RuntimeException("Failed to parse testcases.json", e);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment