xgoprev/tests/cjson.xgo

21 lines
300 B
Text
Raw Normal View History

2024-06-06 09:07:56 +03:00
cjson := import("cjson")
fmt := import("fmt")
2024-06-06 15:00:39 +03:00
log := import("log")
2024-06-06 09:07:56 +03:00
dec := cjson.new_decoder("tests/data.cjson")
2024-06-06 15:00:39 +03:00
log.print("cock")
log.print("die")
log.println("some log")
2024-06-06 09:07:56 +03:00
for {
v := dec.decode()
if is_error(v) {
break
}
if !v {
break
}
2024-06-06 15:00:39 +03:00
log.println("got one more value")
2024-06-06 09:07:56 +03:00
fmt.println(v)
}