JSON parser: Use array for function params (#2255)
This commit is contained in:
parent
2116a98745
commit
3f0ec2334f
1 changed files with 5615 additions and 2380 deletions
|
|
@ -1001,14 +1001,17 @@ static void ExportParsedData(const char *fileName, int format)
|
|||
if (funcs[i].paramCount == 0) fprintf(outFile, "\n");
|
||||
else
|
||||
{
|
||||
fprintf(outFile, ",\n \"params\": {\n");
|
||||
fprintf(outFile, ",\n \"params\": [\n");
|
||||
for (int p = 0; p < funcs[i].paramCount; p++)
|
||||
{
|
||||
fprintf(outFile, " \"%s\": \"%s\"", funcs[i].paramName[p], funcs[i].paramType[p]);
|
||||
fprintf(outFile, " {\n");
|
||||
fprintf(outFile, " \"name\": \"%s\",\n", funcs[i].paramName[p]);
|
||||
fprintf(outFile, " \"type\": \"%s\"\n", funcs[i].paramType[p]);
|
||||
fprintf(outFile, " }");
|
||||
if (p < funcs[i].paramCount - 1) fprintf(outFile, ",\n");
|
||||
else fprintf(outFile, "\n");
|
||||
}
|
||||
fprintf(outFile, " }\n");
|
||||
fprintf(outFile, " ]\n");
|
||||
}
|
||||
fprintf(outFile, " }");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue