jason 将JSON转换为C结构
杰森用法npm install JAForbes/jason var generated_C = require ( 'jason' ) ( 'people' , 'Person' , [ { first : "James" , last : "Forbes" , age : 26 , awesome : true } ] ) generated_C如下所示struct Person { char *first; char *last; float age; int awesome; }; struct Person people[] = { { " James " , " Forbes " , 24 , 1 }, };将其另存为一个名为people.c的文件并将其#include到您的
用户评论