SI_Traktor/venv/lib/python3.6/site-packages/json2xml/json2xml.py
Marcin Kwapisz e0ed1117b6 Przynosiny
2020-01-26 22:25:53 +01:00

14 lines
366 B
Python

# -*- coding: utf-8 -*-
import dict2xml
class Json2xml(object):
def __init__(self, data: str, wrapper: str = "all", indent: int = 4) -> None:
self.data = data
self.indent = indent
self.wrapper = wrapper
def to_xml(self):
if self.data:
return dict2xml.dict2xml(self.data, self.wrapper, indent=self.indent * " ")