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

Evaluation results

100%

15%

Null-safe Inventory XML

Ignore null children when emitting XML

Criteria
Without context
With context

Uses toXml

100%

100%

Default null omission

66%

100%

Toggle for nulls

80%

100%

Data shaping

100%

100%

100%

20%

XML Catalog Reader

Return JS object instead of JSON string

Criteria
Without context
With context

Object mode

100%

100%

Attributes kept

100%

100%

Product array

100%

100%

Trimmed text

33%

100%

Buffer input

0%

100%

100%

XML Payload Converter

XML to JSON conversion (string output with JS-safe escaping)

Criteria
Without context
With context

toJson usage

100%

100%

JS-safe output

100%

100%

Object mode

100%

100%

Array notation

100%

100%

Sanitize toggle

100%

100%

Option passthrough

100%

100%

100%

Array-Enforced XML Parsing

Array notation to collect repeated tags (global or selective)

Criteria
Without context
With context

API usage

100%

100%

Object output

100%

100%

Global arrays

100%

100%

Selective arrays

100%

100%

Order kept

100%

100%

28%

-72%

Sanitized Message Bridge

Sanitization controls to escape/unescape without double-encoding

Criteria
Without context
With context

toXml sanitize

100%

0%

toJson parsing

100%

100%

Text mapping

100%

0%

Attribute handling

100%

0%

Round-trip safety

100%

40%

100%

Reversible XML Text Preservation

Reversible mode preserving text nodes for round-trip

Criteria
Without context
With context

Reversible conversion

100%

100%

Object output

100%

100%

Default text key

100%

100%

Custom text key

100%

100%

Round-trip output

100%

100%

Attribute preservation

100%

100%

100%

13%

XML Stream to JSON CLI

CLI xml2json command for stdin to JSON with --version support

Criteria
Without context
With context

Uses xml2json CLI

100%

100%

Stdin piping

60%

100%

Pretty output

100%

100%

Error handling

73%

100%

Version passthrough

93%

100%

100%

Custom Text Node JSON Conversion

Alternate text node key name selection

Criteria
Without context
With context

Library parsing

100%

100%

Object output

100%

100%

Reversible mode

100%

100%

Custom string key

100%

100%

Short key toggle

100%

100%

Default `$t` fallback

100%

100%

100%

Catalog XML Publisher

JSON or string input to XML generation with attribute/$t mapping

Criteria
Without context
With context

toXml use

100%

100%

Attribute mapping

100%

100%

Sanitize option

100%

100%

Ignore null option

100%

100%

100%

28%

Trimmed Manifest Parser

Whitespace trimming and text-node collapsing in non-reversible mode

Criteria
Without context
With context

toJson object output

100%

100%

Trim option

60%

100%

Reversible off

80%

100%

Collapsed text values

33%

100%

Whitespace-only nodes

80%

100%

Install with Tessl CLI

npx tessl i tessl/npm-xml2json
Evaluated
Agent
Codex

Table of Contents