Converts XML to JSON and vice-versa using node-expat parser
Overall
score
93%
{
"context": "Evaluates how the solution uses xml2json's XML emission API to build an inventory feed while controlling omission or inclusion of null-valued children. Focus is on proper toXml usage and configuration of ignoreNull across default and opt-in behaviors.",
"type": "weighted_checklist",
"checklist": [
{
"name": "Uses toXml",
"description": "Calls xml2json's `toXml` to produce the inventory XML instead of manual string building.",
"max_score": 25
},
{
"name": "Default null omission",
"description": "Invokes `toXml` with `ignoreNull: true` (or equivalent default) so null-valued fields are dropped when inclusion is not requested.",
"max_score": 30
},
{
"name": "Toggle for nulls",
"description": "Switches `ignoreNull` off (e.g., `ignoreNull: false`) when the caller requests null emission so null fields become empty elements.",
"max_score": 25
},
{
"name": "Data shaping",
"description": "Structures the input object/arrays in the format `toXml` expects (e.g., using arrays for repeated items) rather than preformatted XML strings to let the library handle element creation.",
"max_score": 20
}
]
}Install with Tessl CLI
npx tessl i tessl/npm-xml2jsondocs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10