最近在使用JSON.toJSONString过程中出现实体类的属性与转换之前的顺序不一致 public static void main(String[] args) { Person person = new Person(); person.setName("Tom"); person.setAge(20); person.setGender("Male"); person.setHeight(180.5); person.setWeight(80.5); Sy
为了让游戏前端数据输出更加条理,做了一个简单树状结构来打印数据. ccmlog.lua local function __tostring(value, indent, vmap) local str = '' indent = indent or '' vmap = vmap or {} --递归结束条件 if (type(value) ~= 'table') then if (type(value) == 'string') then --字符串 str = string.format("[