Skip to main content

No project description provided

Project description

jsonml

This library is a python implementation of jsonml.

See below for jsonml specifications.

Requirement

  • Python 3.8+

Getting Started

from jsonml import Parser

parser = Parser()

obj = ["tag1", ["tag2", ["tag3", "1"]]]

tree_1 = parser.parse(obj)
xml_1 = parser.to_xml(tree_1)
jsonml = parser.to_jsonml(tree_1)

tree_2 = parser.parse_from_xml_string(xml_1)
assert parser.to_jsonml(tree_2) == jsonml
<tag1><tag2><tag3>1</tag3></tag2></tag1>
[
  "tag1",
  [
    "tag2",
    [
      "tag3",
      "1"
    ]
  ]
]

Contribute

poetry install
pre-commit install
source .venv/bin/activate
make

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jsonml-0.0.3.tar.gz (2.9 kB view hashes)

Uploaded Source

Built Distribution

jsonml-0.0.3-py3-none-any.whl (3.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page