I was trying out some of the JSON examples in the Advanced Notecard Configuration documentation and some were giving me errors. I realized that it was due to comments being used in the JSON.
e.g
{
“req”: “card.io”,
“i2c”: 24 // 0x18
}
{
“err”: “cannot interpret JSON: string or ‘}’ expected near end of file {io}”
}
and
{
“req”: “card.aux”,
“mode”: “gpio”,
“usage”: [
“off”, // AUX1
“low”, // AUX2
“high”, // AUX3
“input” // AUX4
]
}
{
“err”: “cannot interpret JSON: string or ‘}’ expected near end of file {io}”
}
If I remove the comments, the code will work. Is there some preprocessor missing to strip the comments? Or are comments not allowed?