CocoaPods trunk is moving to be read-only. Read more on the blog, there are 19 months to go.
TestsTested | ✓ |
LangLanguage | SwiftSwift |
License | MIT |
ReleasedLast Release | Aug 2015 |
SPMSupports SPM | ✗ |
Maintained by Luke Scott.
JSON parser & tokenizer in pure Swift
JSON.Parser.parse("[1,2,3]") // Optional([1.0, 2.0, 3.0])
var buffer = JSON.Buffer()
var parser = JSON.Parser(buffer)
buffer.write("[1,2,")
println(parser.parse()) // nil
buffer.write("3]")
println(parser.parse()) // Optional([1.0, 2.0, 3.0])
println(parser.parse()) // nil
var buffer = JSON.Buffer()
var parser = JSON.Parser(buffer, kind: .Unwrap)
buffer.write("[1,2,")
println(parser.parse()) // Optional(1.0)
println(parser.parse()) // Optional(2.0)
println(parser.parse()) // nil
buffer.write("3]")
println(parser.parse()) // Optional(3.0)
println(parser.parse()) // nil