Skip to content
This repository was archived by the owner on Jan 7, 2021. It is now read-only.
This repository was archived by the owner on Jan 7, 2021. It is now read-only.

What is the meaning of $t in reversible parsing? #196

@silversonicaxel

Description

@silversonicaxel

I'm using this parser command parser.toJson(XMLContent, { reversible: true } and it is not yet totally clear to me why from this xml:

const xmlData = `<rss><title>example</title></rss>`

I reach this json:

const jsonData = { rss: { title: {"$t":"example"}}}

and not this json:

const jsonData = { rss: { title: "example"}}

Can someone explain me why, because documentation is lacking here, or at least, I was not able to understand the reason checking source code here

- reversible: If true, the parser generates a reversible JSON, mainly
              characterized by the presence of the property $t.

at line

* - reversible: If true, the parser generates a reversible JSON, mainly

thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions