Latest 0.1.1
Homepage https://github.com/vivalalova/LOModel
License MIT
Platforms ios 8.0
Authors

CI Status
Version
License
Platform

Example

To run the example project, clone the repo, and run pod install from the Example directory first.

Requirements

Installation

LOModel is available through CocoaPods. To install
it, simply add the following line to your Podfile:

pod "LOModel"

Useage

Inherit LOModel

class ExampleModel: LOModel {
    var title:String?
    var id = 0
}

And init with Dictionary

let obj = ExampleModel(dict: ["title":"okok","identifier":123])

print(obj.title)
print(obj.id)
print(obj.toDictionary())

Notice

  • Some types like integer and double must has default value example for 0

Author

vivalalova

License

LOModel is available under the MIT license. See the LICENSE file for more info.

Latest podspec

{
    "name": "LOModel",
    "version": "0.1.1",
    "summary": "A Swift 3 data model object",
    "description": "A Swift 3 data model object manage json easily",
    "homepage": "https://github.com/vivalalova/LOModel",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "vivalalova": "[email protected]"
    },
    "source": {
        "git": "https://github.com/vivalalova/LOModel.git",
        "tag": "0.1.1"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source_files": "LOModel/Classes/**/*",
    "pushed_with_swift_version": "3.0"
}

Pin It on Pinterest

Share This