JSON Parsing error: SyntaxError: Unexpected token @

When I attempt to create the projection as follows in my Event Store database using Event Store Server version 2.0.1



$any: function (s, e) {

if (e.eventType.indexOf(’$’) !== 0 &&

e.streamId.indexOf(’$’) !== 0)

linkTo(‘Non-SystemEvents’, e);



Everything appears fine and it runs from 0 to 100 percent without any visible errors. The total count of these items is 3770573 on my particular database.

When I run the exact projection using the same database on Event Store server version 3.2.2 I get a slew of errors during projection creation stating “P: JSON Parsing error: SyntaxError: Unexpected token @” Since everything that I can Query on using the Query page will parse out the JSON, how can I see what event this is that is causing the problem? How can I examine it in it’s raw state so I can see which event and what the problem is?

It sounds like you are trying to deserialize a linkto event