有没有一种合理的简单方法来在C中将树结构如下所示转换为JSON?为了方便读写文件和执行之间的存储?C将树结构转换为JSON
也许在另一种格式(我只选择JSON,因为我对它更有经验)。
struct node {
datatype data; // whatever data is inside the node
struct node *left_ptr; // may be NULL
struct node *right_ptr; // may be NULL
}
感谢,
我敢肯定我提到它是一棵树'转换树结构' –
@PezCuckow:'scuse me,错过了那一点。未定-1,道歉 –