You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 27, 2018. It is now read-only.
@chrisdias Good catch. This is not because of the space. My Grammar is currently handling only JSON objects/arrays. And above is a JavaScript object. Hence my JSON parsing is failing. I have two code paths to execute scripts internally, one using the node library (which needed JSON parsing) and the other pipe the text to mongo shell. I would like to move away from mongo shell to node library. Currently following commands are executed using node lib
find commands
insert commands
Due to invalid grammar, there are randomly generated nodes which caused both to take different paths. Hence first (taking the node library) is failing and the other (taking shell path) is working.
Fixed it
Enhanced grammar to support Javascript objects
Now, insert with JSON or JavaScript object is supported and both go through node API path.
this fails with "unexpected token i in JSON at position 2". Note the space between
{
andid
:This works (note no space between the first
{
andid
):The text was updated successfully, but these errors were encountered: