在go中使用lua示例, 基于gopher-lua!
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

23 wiersze
385 B

4 lat temu
  1. # json
  2. origin code: https://github.com/vadv/gopher-lua-libs/tree/master/json
  3. ## Usage
  4. ```lua
  5. local json = require("json")
  6. -- json.encode()
  7. local jsonString = [[
  8. {
  9. "a": {"b":1}
  10. }
  11. ]]
  12. local result, err = json.decode(jsonString)
  13. if err then error(err) end
  14. -- json.decode()
  15. local table = {a={b=1}}
  16. local result, err = json.encode(table)
  17. if err then error(err) end
  18. ```