Converts XML to JSON and vice-versa using node-expat parser
93
Pending
Does it follow best practices?
Impact
93%
1.01xAverage score across 10 eval scenarios
Pending
The risk profile of this skill
{
"context": "Evaluates how well the solution leverages xml2json to turn JSON strings or objects into XML while relying on the library's attribute and $t text-node mapping. Checks correct use of toXml options to handle sanitization and null suppression exactly as the package supports.",
"type": "weighted_checklist",
"checklist": [
{
"name": "toXml use",
"description": "Imports xml2json and calls its toXml function for XML generation from both JSON string and object inputs instead of manual string building, parsing string input before passing it through the library.",
"max_score": 30
},
{
"name": "Attribute mapping",
"description": "Relies on xml2json.toXml default behavior where primitive properties become attributes and $t values become element text, avoiding custom serialization that bypasses the package's attribute/text handling.",
"max_score": 30
},
{
"name": "Sanitize option",
"description": "Enables xml2json.toXml with sanitize: true when escaping is required so special characters in attributes and text are handled by the library rather than manual escaping.",
"max_score": 20
},
{
"name": "Ignore null option",
"description": "Uses the ignoreNull option of xml2json.toXml to suppress null-valued fields instead of filtering them manually, ensuring the package governs null handling.",
"max_score": 20
}
]
}docs
evals
scenario-1
scenario-2
scenario-3
scenario-4
scenario-5
scenario-6
scenario-7
scenario-8
scenario-9
scenario-10