CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-xml2json

Converts XML to JSON and vice-versa using node-expat parser

Overall
score

93%

Overview
Eval results
Files

rubric.jsonevals/scenario-7/

{
  "context": "Evaluates how the solution leverages the xml2json command-line tool to convert stdin XML to JSON, format output, surface errors, and expose the converter's reported version. Focuses strictly on correct invocation and handling of the xml2json executable and its outputs.",
  "type": "weighted_checklist",
  "checklist": [
    {
      "name": "Uses xml2json CLI",
      "description": "Invokes the xml2json executable rather than reimplementing parsing; passes XML through stdin and reads the tool's stdout for JSON output.",
      "max_score": 35
    },
    {
      "name": "Stdin piping",
      "description": "Streams stdin data into the xml2json process without buffering to files, ensuring the converter receives the full XML payload before completion.",
      "max_score": 20
    },
    {
      "name": "Pretty output",
      "description": "Transforms the xml2json stdout result into two-space-indented JSON when the --pretty flag is provided, while keeping default runs compact.",
      "max_score": 15
    },
    {
      "name": "Error handling",
      "description": "Detects non-zero exit or stderr from xml2json for malformed XML and propagates a non-zero status without emitting partial JSON.",
      "max_score": 15
    },
    {
      "name": "Version passthrough",
      "description": "Runs xml2json --version to print only the converter's version string and exits successfully without reading stdin.",
      "max_score": 15
    }
  ]
}

Install with Tessl CLI

npx tessl i tessl/npm-xml2json

tile.json