Imports System.Text.Json.Serialization
' A simple student struct
Public Class Student
<JsonPropertyName("firstName")>
Public Property FirstName As String
<JsonPropertyName("lastName")>
Public Property LastName As String
<JsonPropertyName("age")>
Public Property Age As Integer
End Class
Imports System.Text.Json
Imports Generator.Generator
Imports Microsoft.VisualBasic.FileIO
Module Program
Sub Main(args as String())
Dim input As String
Dim output As String
Dim student As Student
input = FileSystem.ReadAllText("input.json")
student = JsonSerializer.Deserialize(Of Student)(input)
output = JsonSerializer.Serialize(student)
FileSystem.WriteAllText("output.json", output, True)
End Sub
End Module