在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:johnlui/JSONNeverDie开源软件地址:https://github.com/johnlui/JSONNeverDie开源编程语言:Swift 100.0%开源软件介绍:JSONNeverDie is an auto reflection tool from JSON to Model, a user friendly JSON encoder / decoder, aims to never die. Also JSONNeverDie is a very important part of Pitaya. 中文介绍Exampleset up a Model: class People: JSONNDModel {
@objc var name = ""
} reflex JSON to Model automatic: let json = JSONND(string: "{\"name\": \"JohnLui\"}")
let people = People(JSONNDObject: json)
print(people.name) Featuresreflection features
Read the documentation of auto reflection.JSON encode / decode features
And JSONNeverDie is well tested. Requirements
##Contribution You are welcome to fork and submit pull requests. ##License JSONNeverDie is open-sourced software licensed under the MIT license. 中文介绍基本示例构建一个 Model: class People: JSONNDModel {
@objc var name = ""
} 从字符串转换成 JSON 再自动映射为 Model: let json = JSONND(string: "{\"name\": \"JohnLui\"}")
let people = People(JSONNDObject: json)
print(people.name) 中文文档参与开源欢迎提交 issue 和 PR,大门永远向所有人敞开。 开源协议本项目遵循 MIT 协议开源,具体请查看根目录下的 LICENSE 文件。 |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论