Skip to content

Latest commit

 

History

History
24 lines (17 loc) · 1.29 KB

README.md

File metadata and controls

24 lines (17 loc) · 1.29 KB

JsonSupport

Xcode Swift GitHub tag (latest SemVer) GitHub

What

JsonSupport is a Swift Package Manager package for iOS/tvOS (10.0 and above), watchOS (4.0 and above), and macOS (10.14 and above), under Swift 5.0 and above, defining a few simple functions to perform common operations associated with encoding and decoding local JSON files:

public func jsonDecode <T: Decodable> (fileName: String, in bundle: Bundle = .main) throws -> T?
public func jsonEncode <T: Encodable> (_ instance: T) throws -> Data
public func jsonString <T: Encodable> (for instance: T) throws -> String?

Installation

JsonSupport is provided only as a Swift Package Manager package, because I'm moving away from CocoaPods and Carthage, and can be easily installed directly from Xcode.

License

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