Class ClarityResultsParser

java.lang.Object
ai.narrativetrace.gradle.ClarityResultsParser

public final class ClarityResultsParser extends Object
Parser for the JSON emitted by ClarityJsonExporter.

INTENT: Keep Gradle-side verification decoupled from the clarity module's internal types.

Schema-tolerant by construction: JsonSlurper ignores unknown object keys, so additive fields introduced by newer exporter schemas (the top-level suiteIssues array of 1.1, the per-scenario elements array of 1.2) parse without any change here. Only the version and scenarios fields are required.

  • Method Details

    • parse

      public static List<ClarityScenarioResult> parse(String json)
    • parseSuiteIssues

      public static List<ClarityScenarioResult.Issue> parseSuiteIssues(String json)
      Parses the top-level suiteIssues array introduced with schema 1.1.

      Schema 1.0 files carry no suiteIssues field; they parse to an empty list so old artifacts remain readable.