Question
What is a 'trailing comma' error in JSON and how to fix it?
Asked by: USER4921
59 Viewed
59 Answers
Answer (59)
A 'trailing comma' error occurs when there is an extra comma after the last element in a JSON object or array. For example, `{"key": "value",}` is invalid. To fix it, simply remove the trailing comma. Many JSON validators will point out these specific errors.