SwiftXMLRPC is a lightweight parser for XMLRPC.
Under the hood, this project uses SwiftParsec to parse XML.
All types support serialization and deserialization.
// success(SwiftXMLRPC.XMLRPC.Response.params([SwiftXMLRPC.XMLRPC.Parameter.double(1.0)]))
print(
XMLRPC.Response.deserialize(
from: """
<?xml version="1.0" encoding="UTF-8"?><methodResponse><params><param><value><double>1.0</double></value></param></params></methodResponse>
""",
sourceName: "https://examplewebsite.com/XMLRPC"
)
)
let xml = XMLRPC.Call(
method: "example.method",
params: [
.struct(
[ "first": .string("item"),
"second": .array([.double(1e9)]),
"third": .date(Date())
]
)
]
).serialize()
Tests are writen with SwiftCheck and utilise roundtripping to catch bugs.
link |
Stars: 0 |
Last commit: 37 weeks ago |
int
case has been renamed to int32
and is now restricted to 32 bit integers.int8
int16
int64
nil
dateTime
(full ISO8601 date with -
, :
and optional time zone)Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics