jsonToXml static method

String jsonToXml(
  1. String json, {
  2. String rootName = "root",
  3. bool pretty = true,
})

Implementation

static String jsonToXml(String json, {String rootName = "root", bool pretty = true}) {
  final StringBuffer sb = StringBuffer();
  _emitXml(sb, rootName, jsonDecode(json), pretty ? 0 : -1);
  return sb.toString().trimRight();
}