Dim output_data_json As String = JsonConvert.SerializeObject(out_obj, Formatting.None, New JsonSerializerSettings With {.NullValueHandling = NullValueHandling.Ignore})
Dim output_data As String = String.Format("CG 1-20 ADD 1 {0} 1 ""{1}""", """TEST-1/SAMPLE1""", output_data_json)
CasperLink.SendString(output_data)
which gives me;
[2019-04-05 15:30:08.367] [info] Received message from 192.168.1.5: CG 1-20 ADD 1 "TEST-1/SAMPLE1" 1 "{"f0":"RACE001 00:59.8","p1":"1","n1":"Lane_2","d1":"0"}"\r\n [2019-04-05 15:30:08.368] [info] Sent message to 192.168.1.5:202 CG OK\r\n [2019-04-05 15:30:08.373] [info] html[file://C:/Users/threadripper/Documents/casparcg-server-2.2.0-stable-windows/template/TEST-1/SAMPLE1.html] Destroyed. [2019-04-05 15:30:08.461] [info] html[file://C:/Users/threadripper/Documents/casparcg-server-2.2.0-stable-windows/template/TEST-1/SAMPLE1.html] 1920 1080 50 Log: Uncaught SyntaxError: Unexpected end of JSON input
that seems to do the trick. I actually found the value within the key:pair would replace to {\"foo\":\"bar\\\}"
so also added a second replace to fix that; string.replace("\\\","\")
Not sure how that is happening compaired to your output - all key:pairs are strings.