Closed talun2075 closed 4 years ago
Can you post the json that the app receives from the bridge? Maybe get it with a tool like Fiddler.
I have look a little bit more in it. I have create a new class Based on Light and override the Property Capabilities. Then all works fine.
To understand it right. The Code from you works on c#. I got all in fine objects and can work with them but if I want to give it to my UI the MVC API convert it in Json an there is the problem.
I Attach the raw Response from the Bridge and hope it will help.
Thanks
This does not look like a problem with Q42.HueApi. Are you using the Newtonsoft JsonConverter or the new System.Text.Json included with asp.net core 3.2? The current models work with the Newtonsoft converter. If you want to create json models for your UI, a good practice is to use your own models.
It is an error in GamutConverter. JsonSerializer should be used instead of writing List<List
Fix has been deployed to NuGet with version 3.15.1
Hi, I got on my MVC API an Error, if I return the Result of "UseClient.GetLightsAsync()" All others like Groups works well. Every Time I want to call a Phillips Light I got Errors. If I call a Light like my Osram PowerPlug it works fine.
The Exception is a: Newtonsoft.Json.JsonWriterException The Error I got is Q42.HueApi\Converters\GamutConverter.cs:Zeile 71
Maybe You can Help me why I got a Serilisation error.