Handle memory and security constraints
masterWhen using fastjson, be aware of the following security and memory considerations:
- Memory Usage:
fastjsoncan require up tosizeof(Value) * len(inputJSON)bytes of memory. To prevent exhaustion attacks, always limit the maximum size of theinputJSONbyte slice before passing it to the parser. - Input Validation:
fastjsonis designed not to crash or panic on specially crafted malicious input; it will return an error for invalid JSON instead.