20 lines
300 B
Text
20 lines
300 B
Text
cjson := import("cjson")
|
|
fmt := import("fmt")
|
|
log := import("log")
|
|
dec := cjson.new_decoder("tests/data.cjson")
|
|
|
|
log.print("cock")
|
|
log.print("die")
|
|
|
|
log.println("some log")
|
|
for {
|
|
v := dec.decode()
|
|
if is_error(v) {
|
|
break
|
|
}
|
|
if !v {
|
|
break
|
|
}
|
|
log.println("got one more value")
|
|
fmt.println(v)
|
|
}
|