cjson.xgo 300 B

1234567891011121314151617181920
  1. cjson := import("cjson")
  2. fmt := import("fmt")
  3. log := import("log")
  4. dec := cjson.new_decoder("tests/data.cjson")
  5. log.print("cock")
  6. log.print("die")
  7. log.println("some log")
  8. for {
  9. v := dec.decode()
  10. if is_error(v) {
  11. break
  12. }
  13. if !v {
  14. break
  15. }
  16. log.println("got one more value")
  17. fmt.println(v)
  18. }