Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1
2
3
4
5
6
7
8
9
10
11
12
13
# -*- 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 * " ")