jsontk
from Top Gear S29E2
又不是不能用,你就说比标准库快不快吧
features
{
"with" : // comments!
true,
"allows": 1, // a bit of error
}
compatibility
tested with https://github.com/nst/JSONTestSuite
using this code:
tks, err := jsontk.Tokenize(b)
//fmt.Println(f)
if err != nil {
os.Exit(1)
}
for _, tk := range tks {
v := jsontk.JSON([]jsontk.Token{tk})
var err error
switch tk.Type {
case jsontk.NUMBER:
_, err = v.Float64()
case jsontk.STRING:
_, err = v.String()
}
if err != nil {
os.Exit(1)
}
}
the results only shows the difference between standard library and jsontk, the succeeded cases are not shown.
Warning
EXPERIMENTAL