SyntaxError: Unexpected token o in JSON at position code example
Example 1: "SyntaxError: Unexpected token o in JSON at position 1
var newData = JSON.stringify(userData)
Example 2: SyntaxError: Unexpected token u in JSON at
That error is normally seen when the value given to JSON.parse is actually undefined.
So, I would check the code that is trying to parse this - most likely you are not parsing the actual string shown here.
Example 3: unexpected token s in json at position 0
var s = '"something"';
var result = JSON.parse(s);