File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,22 +8,14 @@ namespace NativeAotAnnotations;
88
99[ JsonSerializable ( typeof ( PromptRequest ) ) ]
1010[ JsonSerializable ( typeof ( AppInfoResponse ) ) ]
11+ [ JsonSourceGenerationOptions ( PropertyNamingPolicy = JsonKnownNamingPolicy . CamelCase ) ]
1112internal partial class AppJsonContext : JsonSerializerContext ;
1213
1314internal record AppInfoResponse
1415{
15- [ JsonPropertyName ( "appName" ) ]
1616 public string AppName { get ; init ; } = "" ;
17-
18- [ JsonPropertyName ( "isNativeAot" ) ]
1917 public bool IsNativeAot { get ; init ; }
20-
21- [ JsonPropertyName ( "framework" ) ]
2218 public string Framework { get ; init ; } = "" ;
23-
24- [ JsonPropertyName ( "architecture" ) ]
2519 public string Architecture { get ; init ; } = "" ;
26-
27- [ JsonPropertyName ( "os" ) ]
2820 public string Os { get ; init ; } = "" ;
2921}
Original file line number Diff line number Diff line change @@ -60,22 +60,14 @@ static string GetAppInfo()
6060
6161[ JsonSerializable ( typeof ( PromptRequest ) ) ]
6262[ JsonSerializable ( typeof ( AppInfoResponse ) ) ]
63+ [ JsonSourceGenerationOptions ( PropertyNamingPolicy = JsonKnownNamingPolicy . CamelCase ) ]
6364internal partial class AppJsonContext : JsonSerializerContext ;
6465
6566internal record AppInfoResponse
6667{
67- [ JsonPropertyName ( "appName" ) ]
6868 public string AppName { get ; init ; } = "" ;
69-
70- [ JsonPropertyName ( "isNativeAot" ) ]
7169 public bool IsNativeAot { get ; init ; }
72-
73- [ JsonPropertyName ( "framework" ) ]
7470 public string Framework { get ; init ; } = "" ;
75-
76- [ JsonPropertyName ( "architecture" ) ]
7771 public string Architecture { get ; init ; } = "" ;
78-
79- [ JsonPropertyName ( "os" ) ]
8072 public string Os { get ; init ; } = "" ;
8173}
You can’t perform that action at this time.
0 commit comments