A Swift wrapper for C++ library that converts XML to JSON.
Swift Package Manager is a tool for
managing the distribution of Swift code.
Once you have your Swift package set up, adding xml2json
as a dependency is as
easy as adding it to the dependencies
value of your Package.swift
.
dependencies: [
.package(url: "https://github.com/wacumov/xml2json", from: "0.0.1")
]
Just read contents of an XML file to a string and pass it to the converter.
import xml2json
let jsonString = XMLToJSON.convert(xmlString)