xon

XML Object Notation serializer/deserializer
Download

xon Ranking & Summary

Advertisement

  • Rating:
  • License:
  • MIT/X Consortium Lic...
  • Price:
  • FREE
  • Publisher Name:
  • Matt Behrens
  • Publisher web site:
  • https://github.com/askedrelic/

xon Tags


xon Description

xon is a Python implementation of "XML Object Notation", or XON. It generally conforms to the pickle protocol, which means you interact with it using load and dump functions.XON arose out of a need to support XML in web-based APIs that already support JSON, and supports the same vocabulary that JSON does. It is based on--and, in fact, the test cases come from--Stefan Goessner's "Converting Between XML and JSON". If you don't use any of xon's extra options, it is intended to work exactly like Goessner describes therein:>>> import xon>>> xon.dumps({'foo': {'bar': }})'< foo >< bar >baz< /bar >< bar >quux< /bar >< /foo >'>>> xon.loads('< foo >< bar >baz< /bar >< bar >quux< /bar >< /foo >'){'foo': {'bar': }}Additional options include convertvalues, which will convert ints, floats, and bools in addition to the default behavior of handling strings only, and wrap/unwrap, which deals with the root tag so that the load result and dump parameters are more like typical JSON objects.Product's homepage


xon Related Software