Reputation: 137
I am testing my JSON output using the JSONLint validator. The validator validates my JSON but it deletes the bold part of the file. For example:
{
"tableName": "BMCD_BILL_SUB_GRP_VW",
"columns": [],
"tableName": "BMCD.BMCD_SUB_GRP_TT",
"columns": [
"CURRENT_INVOICE",
"DIFFERENCE",
"CUM_BILLED_VALUE",
"PREVIOUS_BILLED",
"REVENUE_BUDGET",
"BILLING_METHOD",
"SUB_GROUP",
"TOP_TASK_ID",
"PROJECT_ID"
]
}
If I change one of the keys to "tableName1" it validates and does not delete the record.
Am I missing something?
Upvotes: 0
Views: 68
Reputation: 137
Indra you are correct, this is the format I was trying to use. Thank you. { "table": [ { "tableName": "BMCD_BILL_SUB_GRP_VW", "columns": [] }, { "tableName": "BMCD.BMCD_SUB_GRP_TT", "columns": [ "CURRENT_INVOICE", "DIFFERENCE", "CUM_BILLED_VALUE", "PREVIOUS_BILLED", "REVENUE_BUDGET", "BILLING_METHOD", "SUB_GROUP", "TOP_TASK_ID", "PROJECT_ID" ] } ] }
Upvotes: 0
Reputation: 2935
Its not an answer. But Im not able to comment.
You cannot have duplicate key strings in json. Thats why its getting deleted.
Upvotes: 1