Imports System.Collections
Imports System.Collections.Generic
Imports System.Globalization
Imports System.Reflection
Imports System.ComponentModel.DataAnnotations
Imports Newtonsoft.Json.Linq
Imports Newtonsoft.Json.Converters
Imports Newtonsoft.Json.Serialization
Dim data As String = "John Doe"
Dim example = New With { _
.fields = {"name","Company.name","email","mobile"}, _
.condition = "CONTAINS", _
.moduleName = "Contact", _
.field = new With { .fieldName = "name" }, _
Dim json as String = JsonConvert.SerializeObject(example, Formatting.Indented)
Console.WriteLine("Environment version: " & Environment.Version.ToString())
Console.WriteLine("Json.NET version: " & GetType(JsonSerializer).Assembly.FullName)
Console.WriteLine("Unhandled exception: ")