github.com/anchore/syft@v1.38.2/syft/pkg/cataloger/dotnet/test-fixtures/image-net8-ilrepack/src/Program.cs (about)

     1  using System;
     2  using Humanizer;
     3  using Newtonsoft.Json;
     4  using Newtonsoft.Json.Linq;
     5  
     6  
     7  namespace IndirectDependencyExample
     8  {
     9      class Program
    10      {
    11          static void Main(string[] args)
    12          {
    13              string runtimeInfo = "hello world!\n";
    14              Console.WriteLine(runtimeInfo);
    15  
    16  
    17              Console.WriteLine($"\"this_is_a_test\" to title case: {"this_is_a_test".Humanize(LetterCasing.Title)}");
    18  
    19              const string jsonString = @"
    20              {
    21                  ""message"": ""Hello from JSON!"",
    22                  ""details"": {
    23                      ""timestamp"": ""2025-03-26T12:00:00Z"",
    24                      ""version"": ""1.0.0"",
    25                      ""metadata"": {
    26                          ""author"": ""Claude"",
    27                          ""environment"": ""Development""
    28                      }
    29                  },
    30                  ""items"": [
    31                      {
    32                          ""id"": 1,
    33                          ""name"": ""Item One""
    34                      },
    35                      {
    36                          ""id"": 2,
    37                          ""name"": ""Item Two""
    38                      }
    39                  ]
    40              }";
    41  
    42              JObject jsonObject = JObject.Parse(jsonString);
    43  
    44              string message = (string)jsonObject["message"];
    45              Console.WriteLine($"Message: {message}");
    46          }
    47      }
    48  }