Skip to main content

Hello

I am having a few problems formatting a json string for a C# query I am making

@"{""query"": ""query { items_by_multiple_column_values (board_id: 1234, column_id: \\""text0\\"", column_values: [\\""something,something_else\\""] ) {id}"" }";

Here is a little example of the string. I have tried formatting it with JsonConvert.SerializeObject to no avail.

Any help would be much appreciated.

Hello @Will!

Being transparent with you, I do not have experience with C#, but maybe this post, or this one might help 🙂

Cheers,
Matias


Hey @Matias.Monday.

Thanks for the help. While the links were useful, I managed to find an example that worked quite well on stack overflow : https://stackoverflow.com/questions/70717201/monday-com-restsharp-api-request.

The accepted solution worked wonders for me. Thank you very much.

P.S. Here is the block that worked, should it help anyone else :

var call = JsonConvert.SerializeObject(
                new
                {
                    query = "query { items_by_multiple_column_values (board_id: 1234, column_id: \\"text0\\", column_values: [\\"something\\",\\"somethingElse\\"] ) {id column_values(ids: \\"text0\\"){value} } }"
                }
    );

Uses Newtonsoft.Json


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.