actboy168 / json.lua Goto Github PK
View Code? Open in Web Editor NEWA pure Lua JSON library.
License: MIT License
A pure Lua JSON library.
License: MIT License
考虑以下情况
local hash = 0x12345678
local data = {}
data[hash] = true
json.encode(data)
这里这段代码应该是一个错误,但是实际编码的时候,json库会认为 data
是一个数组,并且由于 hash
通常会非常巨大,导致尝试编码一个非常巨大的数组,耗尽了CPU资源。
在尝试编码数组时,应当确认数组的每一项都是有值的,如果用户希望编译出 null
,应当显性放置 json.null
。
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.