我有一个这样的输入json:
输入:
#include<stdio.h>
#include<ctype.h>
#define MAX_SIZE 100
int main(){
int i;
char c[MAX_SIZE]={0};
printf("Enter message:");
for(i=0;getchar()!='\n';i++){
c[i] = getchar(); /*looks like some error here that the compiler didn't found out.....*/
}
for(i=0;c[i]!='\n';i++){
putchar(c[i]);
}
return 0;
}
在这里,我需要更改密钥-authtype并将这些值放入数组中。
期望的杰森:
{
"userstatus": {
"authtype": "S,R,T",}
}
但是我的实际输出是这样的:
{
"userstatus": {
"authtype": ["S","R","T"]
}
}
JOLT SPEC:
{
"authtype" : [ "S,T" ]
}
请为上述测试用例提供帮助吗?