API Errors

If you are working with the AppSheet API we may get Error messages that we don’t understand.
For Example:

  • Error received when fetching REST details: SyntaxError: Unexpected token T in JSON at position 106

  • Object reference not set to an instance of an object.

There may be many reasons. In my case the problem was with double quotes.
This is what I had to change:
Instead of:

{
"Action": "Add",
"Properties": {
"Locale": "en-US",
"Timezone": "W. Europe Standard Time"
},
"Rows": [
{
"Column1": "My_Text_Containing_Double_Quotes"
}
]
}

I had to do:

{
"Action": "Add",
"Properties": {
"Locale": "en-US",
"Timezone": "W. Europe Standard Time"
},
"Rows": [
{
"Column1": 'My_Text_Containing_Double_Quotes'
}
]
}

Please see the single quotes around My_Text_Containing_Double_Quotes.

3 Likes

AppSheet is easy but somewhat tricky.

If we need to use single quote rather than double quote in JSON body, it could be potentially a bug, as JSON always with double quote.

https://www.w3schools.com/js/js_json_syntax.asp

Copy to @Phil

1 Like