using System;
using System.Dynamic;
using System.Text.Json;

namespace ExpandoObjectPlayground
{
    class Program
    {
        static void Main(string[] args)
        {
            dynamic expandoObject = new ExpandoObject();
            expandoObject.message = "Hello message.";
            expandoObject.testing = new ExpandoObject();
            expandoObject.testing.subObject = "Hi how are you?";
            Console.WriteLine(JsonSerializer.Serialize(expandoObject));
        }
    }
}