Latest 0.1.5
Homepage https://github.com/asoderman/JSONDecoder
License MIT
Platforms ios 8.0, osx 10.9
Authors

Simple JSON Parser

Written in swift. Build Status

Installation:

Using SPM (in your Package.swift):

let package = Package(
    name: "NameOfYourProject",
    dependencies: [
        .package(url: "https://github.com/asoderman/JSONDecoder.git", from: "0.1.5")
    ]
)

then

swift package resolve

Usage:

Quickstart

    let j = try! JSONParser(text: JSONTEXT).flatten()

    let name = j["name"] as! String
    let id = j["id"] as! Int

Error handling

    do { 
        let j = try JSONParser(text: BADJSON).flatten()

        let name = j["name"] as! String
        let id = j["id"] as! Int
    } catch {
        // Do something
        }
    }

To work on this library:

  1. Fork this repo on github.
  2. Create a local copy of your repo.
  3. swift package generate-xcodeproj
  4. Submit pull requests.

Latest podspec

{
    "name": "JSONDecoder",
    "version": "0.1.5",
    "summary": "Simple JSON parser written in Swift.",
    "description": "A simple JSON parser written in Swift.",
    "homepage": "https://github.com/asoderman/JSONDecoder",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "Alex Soderman": "[email protected]"
    },
    "platforms": {
        "ios": "8.0",
        "osx": "10.9"
    },
    "source": {
        "git": "https://github.com/asoderman/JSONDecoder.git",
        "tag": "0.1.5"
    },
    "source_files": [
        "Classes",
        "Sources/JSONDecoder/*.{h,swift}"
    ],
    "exclude_files": "Classes/Exclude",
    "pushed_with_swift_version": "4.0"
}

Pin It on Pinterest

Share This