Skip to content

Repository files navigation

PureJsonSerializer Build StatusCarthage 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
letdata:NSData=...do{letjson=tryJson.deserialize(jsonSource)letvalue=json["Foo"]?["bar"]?.stringValue ??""print(value)}catch{print("Json serialization failed with error: \(error)")}

BUILD

// build a JSON structure
letprofile: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

letserializedJson= 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) gfuji@cpan.org

LICENSE

The Apache 2.0 License

About

a pure-Swift JSON serializer and deserializer

Resources

Stars

112 stars

Watchers

12 watching

Forks

Releases

Packages

Used by

Contributors

Languages