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
Public Property fieldName As String
Public Property condition As String
Public Property moduleName As String
Public Property field As Field
Public Property data As String
Public Property [operator] As String
Public Property rules As Rule()
Public Property group As Group
Public Property fields As String()
Public Property query As Query
Dim data As String = "John Doe"
Dim example = New Example With { _
.fields = {"name","Company.name","email","mobile"}, _
.query = New Query With { _
.group = New Group With { _
.condition = "CONTAINS", _
.moduleName = "Contact", _
.field = new Field 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: ")