映射器:Swift的JSON反序列化库

时间:2024-03-17 02:08:13
【文件属性】:

文件名称:映射器:Swift的JSON反序列化库

文件大小:56KB

文件格式:ZIP

更新时间:2024-03-17 02:08:13

lyft Swift

映射器 Mapper是一个简单的Swift库,用于将JSON转换为强类型对象。 与其他某些库相比,Mapper的一个优势是您可以拥有不可变的属性。 安装 与 use_frameworks! pod "ModelMapper" 与 github "lyft/mapper" 用法 简单的例子: import Mapper // Conform to the Mappable protocol struct User : Mappable { let id: String let photoURL: URL ? // Implement this initializer init ( map : Mapper) throws { try id = map. from ( " id " ) photoURL = map. optionalFrom ( " ava


【文件预览】:
mapper-master
----.gitignore(299B)
----Sources()
--------Transform+Dictionary.swift(2KB)
--------Float+Convertible.swift(402B)
--------Mapper.swift(22KB)
--------DefaultConvertible.swift(903B)
--------Defaults+Convertible.swift(740B)
--------URL+Convertible.swift(814B)
--------NSDictionary+Safety.swift(396B)
--------MapperError.swift(1KB)
--------Mappable.swift(2KB)
--------Convertible.swift(2KB)
--------Transform.swift(310B)
----.swiftlint.yml(554B)
----Makefile(2KB)
----Resources()
--------xcconfigs()
--------Info.plist(808B)
--------coverage.sh(356B)
--------get-coverage.py(336B)
----CONTRIBUTING.md(559B)
----LICENSE(9KB)
----CHANGELOG.md(7KB)
----.swift-version(4B)
----.github()
--------workflows()
----README.md(4KB)
----Package.swift(316B)
----ModelMapper.podspec(1KB)
----Tests()
--------PodTests()
--------MapperTests()
----Gemfile(63B)
----.gitattributes(25B)
----Mapper.xcodeproj()
--------xcshareddata()
--------project.xcworkspace()
--------project.pbxproj(21KB)
----Gemfile.lock(2KB)

网友评论