目录
目录README.md

JSONFactorable

Package Validation Status Coverage Status

Installation

Add you dependency to the project. For more info about how to do that read Apple’s docs

CocoaPods

  1. Add pod to your Podfile:
pod 'JSONFactorable'
  1. Install pods:
pod install

Usage

  1. Import framework in your project:
import JSONFactorable
  1. Add extension to JSONFactorable which contains functions used by every factory like buildObject(of:) function.

  2. Looking for more detailed examples of usage look into Tests folder

Merging example

To merge two (or more) objects representable by a dictionary (or an array) follow the example:

var jsonConvertible: AnyJSONConvertible = [
  "key": AnyJSONConvertible(someValue)
]
let mergedJSON = try jsonConvertible.merge(with: AnyJSONConvertible(someObject))

where someObject conforms to JSONObjectType protocol

Contribution

Feel free to add your pull request or create an issue.

Requirements

关于
104.0 KB
邀请码
    Gitlink(确实开源)
  • 加入我们
  • 官网邮箱:gitlink@ccf.org.cn
  • QQ群
  • QQ群
  • 公众号
  • 公众号

©Copyright 2023 CCF 开源发展委员会
Powered by Trustie& IntelliDE 京ICP备13000930号