Skip to content
/ jsonx Public
forked from wbolster/jsonx

Python library for JSONx, an XML representation of the JSON data model

Notifications You must be signed in to change notification settings

devvis/jsonx

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

JSONx

This is a Python module implementing JSONx, an XML representation of the JSON data model. The format is defined by IBM, and documentation is available on the IBM website: JSONx conversion rules

Note: currently only writing support has been implemented; there's no parser yet!

WHAT? WHY WOULD I NEED THIS?

You probably don't want to use this. But, hey, remember, using XML makes your product ready for the enterprise!

Installation

Install using pip:

pip install jsonx

Usage

The interface mimics the familiar json module:

import jsonx

obj = {
    "name": "John Doe",
    "age": 12,
}

# To obtain a byte string, use dumps()
value = jsonx.dumps(obj)

# To write directly to a file-like object, use dump()
with open("output.xml") as fp:
    jsonx.dump(obj, fp)

About

Python library for JSONx, an XML representation of the JSON data model

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%