Latest 0.4
Homepage https://github.com/NSSimpleApps/NSKJSON
License MIT
Platforms ios 8.0, osx 10.9, watchos 2.0, tvos 9.0, requires ARC
Authors

NSKJSON is a swift library to parse plain-json format and json5 format.

Installation: place this into Podfile

use_frameworks!
target 'Target' do
    pod 'NSKJSON'
end

Usage:

import NSKJSON

let data = // some data...

do {
    let plainJson = try NSKJSON.jsonObject(with: data, version: .plain)
    let json5 = try NSKJSON.jsonObject(with: data, version: .json5)
} catch {

    print(error)
}

Test cases were taken from here:

https://github.com/nst/JSONTestSuite

https://github.com/json5/json5-tests

TODO:

  1. Supporting UTF16-BE, UTF16-LE, UTF32-BE, UTF32-LE encodings.

  2. Improve error reports.

Latest podspec

{
    "name": "NSKJSON",
    "version": "0.4",
    "summary": "NSKJSON is a swift library to parse plain-json format and json5 format.",
    "homepage": "https://github.com/NSSimpleApps/NSKJSON",
    "license": {
        "type": "MIT",
        "file": "LICENSE"
    },
    "authors": {
        "NSSimpleApps, Sergey Poluyanov": "[email protected]"
    },
    "source": {
        "git": "https://github.com/NSSimpleApps/NSKJSON.git",
        "tag": "0.4"
    },
    "requires_arc": true,
    "platforms": {
        "ios": "8.0",
        "osx": "10.9",
        "watchos": "2.0",
        "tvos": "9.0"
    },
    "source_files": "Source/Swift/*.swift",
    "pushed_with_swift_version": "3.1"
}

Pin It on Pinterest

Share This