github.com/ssoper/JSON

JSON (RFC 7159) for Swift 2.2 on Linux



Documentation

JSON

Swift 2.2 Platforms Linux License MIT Slack Status

JSON (RFC 7159) for Swift 2.2.

Usage

import JSON

// parse JSON string

let json = try! JSONParser.parse("{\"foo\":\"bar\"}")

// create JSON literal

let json: JSON = [
    "null": nil,
    "string": "Foo Bar",
    "boolean": true,
    "array": [
        "1",
        2,
        nil,
        true,
        ["1", 2, nil, false],
        ["a": "b"]
    ],
    "object": [
        "a": "1",
        "b": 2,
        "c": nil,
        "d": false,
        "e": ["1", 2, nil, false],
        "f": ["a": "b"]
    ],
    "number": 1969
]

Installation

  • Add JSON to your Package.swift
import PackageDescription

let package = Package(
    dependencies: [
        .Package(url: "https://github.com/Zewo/JSON.git", majorVersion: 0, minor: 1)
    ]
)

Community

Slack

Join us on Slack.

License

JSON is released under the MIT license. See LICENSE for details.