X++ pass data to external system

Hi all,
I am creating an HTTP request and calling method writeLine wherein I am passing the Json serialized data as
“{\r\n “ValueSearch”: {\r\n “Value”: “1”\r\n },\r\n “header”: {\r\n “source”: “MySystem”,\r\n }\r\n}”
However I am unable to create a message wherein I want to check for multiple values, I am creating something as:
“{\r\n “ValueSearch”: {\r\n “Value”: “1”\r\n },{\r\n “Value”: “2”\r\n },\r\n “header”: {\r\n “source”: “MySystem”,\r\n }\r\n}”
but this is not doing the required action. Can anyone please help me here, regarding where I am going wrong.

Please start by providing JSON code in a readable form - with line breaks, indentation and without control characters such as \n. When you have correct code, paste it with Insert > Insert Code.

For example, the first code snippet can be displayed as this:

{
	"ValueSearch":
	{
		"Value": "1"
	},
	"header":
	{
		"source": "MySystem",
	}
}

It already highlights a syntax error (the extra comma). Make sure yo fix these errors before continuing,

Then explain your problem - “this is not doing the required action” is way too vague.