文件名称:MsgPack:MessagePack编码器,用于符合Swift 4的Encodable协议的类型
文件大小:21KB
文件格式:ZIP
更新时间:2024-06-02 15:15:23
swift serialization serializer marshalling msgpack
用法 import MsgPack // Encode standard types let encoder = Encoder () try encoder. encode ( " Hello world " ) try encoder. encode ( " :smiling_face_with_halo: " ) try encoder. encode ( 0x0102030405060708 ) try encoder. encode ([ " Some strings " , " in an array " ]) // Encode custom types with Encodable :party_popper: struct Point : Encodable { let x: Int let y: Int } try encoder. encode ( Point ( x : 90 , y : 45 )) 看看上更多的例子。
【文件预览】:
MsgPack-master
----Workspace.xcworkspace()
--------contents.xcworkspacedata(293B)
----MsgPackTests()
--------Info.plist(701B)
--------MsgPackTests.swift(3KB)
----Playground.playground()
--------Contents.swift(919B)
--------contents.xcplayground(167B)
----.gitignore(20B)
----MsgPack()
--------Reference.swift(226B)
--------Encoder.swift(12KB)
--------Decoder.swift(16KB)
--------Format.swift(11KB)
--------Info.plist(874B)
--------MsgPack.h(472B)
----README.md(467B)
----MsgPack.xcodeproj()
--------project.xcworkspace()
--------project.pbxproj(17KB)
--------xcuserdata()
--------xcshareddata()
----LICENSE.txt(1KB)