node 怎么把buffer 转为json对象

如题所述

前端传给服务器的只是json 格式的字符串,使用json_decode, mixed json_decode ( string $json [, bool $assoc ] ) var_dump(json_decode($json)); var_dump(json_decode($json, true)); 如果不带参数,则返回为对象 带上true时,返回数组 fore...
温馨提示:答案为网友推荐,仅供参考
相似回答
大家正在搜