@@ -63,8 +63,8 @@ public OscQueryServer(string serviceName, IPAddress ipAddress)
6363 . WithModule ( new ActionModule ( "/" , HttpVerbs . Get ,
6464 ctx => ctx . SendStringAsync (
6565 ctx . Request . RawUrl . Contains ( "HOST_INFO" )
66- ? JsonSerializer . Serialize ( _hostInfo , JsonSourceGenerationContext . Default . HostInfo )
67- : JsonSerializer . Serialize ( _queryData , JsonSourceGenerationContext . Default . RootNode ) , MediaTypeNames . Application . Json , Encoding . UTF8 ) ) ) ;
66+ ? JsonSerializer . Serialize ( _hostInfo , ModelsSourceGenerationContext . Default . HostInfo ! )
67+ : JsonSerializer . Serialize ( _queryData , ModelsSourceGenerationContext . Default . RootNode ! ) , MediaTypeNames . Application . Json , Encoding . UTF8 ) ) ) ;
6868
6969 // mDNS
7070 _multicastService = new MulticastService
@@ -169,7 +169,7 @@ private async Task FoundNewVrcClient(IPAddress ipAddress, int port)
169169 try
170170 {
171171 response = await Client . GetStringAsync ( url ) ;
172- var rootNode = JsonSerializer . Deserialize ( response , JsonSourceGenerationContext . Default . HostInfo ) ;
172+ var rootNode = JsonSerializer . Deserialize ( response , ModelsSourceGenerationContext . Default . HostInfo ) ;
173173 if ( rootNode ? . OscPort == null )
174174 {
175175 Logger . Error ( "OSCQueryHttpClient: Error no OSC port found" ) ;
@@ -204,7 +204,7 @@ private async Task FetchJsonFromVrc(IPAddress ipAddress, int port)
204204 {
205205 response = await Client . GetStringAsync ( url ) ;
206206
207- var rootNode = JsonSerializer . Deserialize ( response , JsonSourceGenerationContext . Default . RootNode ) ;
207+ var rootNode = JsonSerializer . Deserialize ( response , ModelsSourceGenerationContext . Default . RootNode ) ;
208208 if ( rootNode ? . Contents ? . Avatar ? . Contents ? . Parameters ? . Contents == null )
209209 {
210210 Logger . Debug ( "OSCQueryHttpClient: Error no parameters found" ) ;
0 commit comments