' Collection of code snippets by Arne Vajhøj 
' (likely posted to comp.os.vms/INFO-VAX, INFO-TPU, MACRO32, eksperten.dk, newz.dk, LinkedIn or other place sometime between 1990 and now) 
﻿Imports System
Imports System.Collections.Generic
Imports System.IO

Imports Newtonsoft.Json
Imports Newtonsoft.Json.Linq

Namespace E
    Public Class Program
        Public Shared Sub Main(args As String())
            Dim all As JArray = DirectCast(JsonConvert.DeserializeObject(File.ReadAllText("\work\e.json")), JArray)
            For Each one As JObject In all
                Console.WriteLine("**** start object ****")
                For Each f As KeyValuePair(Of String, JToken) In one
                    Console.WriteLine("field name = {0},  field value = {1}", f.Key, f.Value.ToString())
                Next
            Next
        End Sub
    End Class
End Namespace
