diff --git a/json-csharp/GetValueByKeyFromJObject/GetValueByKeyFromJObject/GetValueByKeyFromJObject.csproj b/json-csharp/GetValueByKeyFromJObject/GetValueByKeyFromJObject/GetValueByKeyFromJObject.csproj index 684f7060f3..22de9cb403 100644 --- a/json-csharp/GetValueByKeyFromJObject/GetValueByKeyFromJObject/GetValueByKeyFromJObject.csproj +++ b/json-csharp/GetValueByKeyFromJObject/GetValueByKeyFromJObject/GetValueByKeyFromJObject.csproj @@ -1,13 +1,13 @@ Exe - net7.0 + net10.0 enable disable - + \ No newline at end of file diff --git a/json-csharp/GetValueByKeyFromJObject/GetValueByKeyFromJObject/JObjectManipulation.cs b/json-csharp/GetValueByKeyFromJObject/GetValueByKeyFromJObject/JObjectManipulation.cs index f032bbb80f..08f30aaa32 100644 --- a/json-csharp/GetValueByKeyFromJObject/GetValueByKeyFromJObject/JObjectManipulation.cs +++ b/json-csharp/GetValueByKeyFromJObject/GetValueByKeyFromJObject/JObjectManipulation.cs @@ -42,7 +42,7 @@ public int GetValuesUsingValueMethod() var name = jsonObject.Value("name"); var make = jsonObject.Value("make"); var model = jsonObject.Value("model"); - var year = jsonObject.Value("year"); + var year = jsonObject.Value("year"); var amount = jsonObject.Value("price") .Value("amount"); diff --git a/json-csharp/GetValueByKeyFromJObject/GetValueByKeyFromJObject/Program.cs b/json-csharp/GetValueByKeyFromJObject/GetValueByKeyFromJObject/Program.cs index f256f3048c..4488acd7fb 100644 --- a/json-csharp/GetValueByKeyFromJObject/GetValueByKeyFromJObject/Program.cs +++ b/json-csharp/GetValueByKeyFromJObject/GetValueByKeyFromJObject/Program.cs @@ -1,3 +1,8 @@ -// See https://aka.ms/new-console-template for more information +using GetValueByKeyFromJObject; -Console.WriteLine("Application Started"); +var jObjectManipulation = new JObjectManipulation(); + +jObjectManipulation.GetValuesUsingIndex(); +jObjectManipulation.GetValuesUsingValueMethod(); +jObjectManipulation.GetValuesUsingSelectToken(); +jObjectManipulation.GetValuesUsingTryGetValue(); diff --git a/json-csharp/GetValueByKeyFromJObject/GetValueByKeyFromJObject/TestData.cs b/json-csharp/GetValueByKeyFromJObject/GetValueByKeyFromJObject/TestData.cs index 014eeede82..914ecfaf9e 100644 --- a/json-csharp/GetValueByKeyFromJObject/GetValueByKeyFromJObject/TestData.cs +++ b/json-csharp/GetValueByKeyFromJObject/GetValueByKeyFromJObject/TestData.cs @@ -4,7 +4,7 @@ public class TestData { public string GenerateSingleJsonObject() { - const string car = $$""" + const string car = """ { "name": "Charger", "make": "Dodge", diff --git a/json-csharp/GetValueByKeyFromJObject/Tests/Tests.csproj b/json-csharp/GetValueByKeyFromJObject/Tests/Tests.csproj index c8a3949457..ead6f71d91 100644 --- a/json-csharp/GetValueByKeyFromJObject/Tests/Tests.csproj +++ b/json-csharp/GetValueByKeyFromJObject/Tests/Tests.csproj @@ -1,7 +1,7 @@ - net7.0 + net10.0 enable enable @@ -9,13 +9,13 @@ - - - + + + runtime; build; native; contentfiles; analyzers; buildtransitive all - + runtime; build; native; contentfiles; analyzers; buildtransitive all