JSON query is not valid

Viewed 21

I have the following query:

[{ "type": "url", "value": ["https://graph.microsoft.com/v1.0/users?$count=true&$search="displayName:room"&$filter=endsWith(mail,'microsoft.com')&$orderBy=displayName&$select=id,displayName,mail"]}]

On running the below code with input as the above query:

JToken.Parse(string query);

I see Invalid JSON query exception

I updated the query to use single quotes for 'displayName:room':

[{ "type": "url", "value": ["https://graph.microsoft.com/v1.0/users?$count=true&$search='displayName:room'&$filter=endsWith(mail,'microsoft.com')&$orderBy=displayName&$select=id,displayName,mail"]}]

With this change, I see Message: Syntax error: character ''' is not valid at position 0 in ''displayName:room'' on making graph call with the url. What am I missing?

0 Answers
Related