Latest 1.0.2
Homepage https://github.com/gfx/Swift-JsonSerializer
License Apache 2.0
Platforms ios 8.0, osx 10.9, watchos 2.0, tvos 9.0, requires ARC
Authors

PureJsonSerializer Build Status Carthage compatible

A pure-Swift JSON serializer and deserializer.

COCOAPODS

Lot’s of CocoaPods means lots of failed namespaces. The actual pod for this library is called PureJsonSerializer.

pod 'PureJsonSerializer'

DESERIALIZE

import PureJsonSerializer

// parse a JSON data
let data: NSData = ...

do {
  let json = try Json.deserialize(jsonSource)
  let value = json["Foo"]?["bar"]?.stringValue ?? ""
  print(value)
} catch {
  print("Json serialization failed with error: (error)")
}

BUILD

// build a JSON structure
let profile: Json = [
  "name": "Swift",
  "started": 2014,
  "keywords": ["OOP", "functional programming", "static types", "iOS"],
]
println(profile.description)      // packed JSON string
println(profile.debugDescription) // pretty JSON string

SERIALIZE

let serializedJson = json.serialize(.PrettyPrint)

DESCRIPTION

Swift-JsonSerializer is a JSON serializer and deserializer which are implemented in Pure Swift and adds nothing
to built-in / standard classes in Swift.

GENOME

This library is featured in a complete Json mapping library you can find here.

KNOWN ISSUES

  • This library doesn’t work with optimization flags (swiftc -O) as of Xcode 6.1.1 / Swift version 1.1 (swift-600.0.56.1).

SEE ALSO

AUTHOR

Fuji, Goro (gfx) [email protected]

LICENSE

The Apache 2.0 License

Latest podspec

{
    "name": "PureJsonSerializer",
    "version": "1.0.2",
    "license": {
        "type": "Apache 2.0"
    },
    "homepage": "https://github.com/gfx/Swift-JsonSerializer",
    "authors": {
        "Goro Fuji": "[email protected]"
    },
    "summary": "A pure-Swift JSON serializer and deserializer",
    "source": {
        "git": "https://github.com/gfx/Swift-JsonSerializer.git",
        "tag": "1.0.2"
    },
    "source_files": "JsonSerializer/*.{swift}",
    "platforms": {
        "ios": "8.0",
        "osx": "10.9",
        "watchos": "2.0",
        "tvos": "9.0"
    },
    "requires_arc": true,
    "social_media_url": "https://twitter.com/__gfx__"
}

Pin It on Pinterest

Share This