local tb = {} tb.name = "chicai" tb.age = 18 local jstr = json.encode(tb) --编码 local tt = json.decode(jstr) --解码