GrabYourPitchforks
GrabYourPitchforks
CC#
Created by KIRA BELMONT on 3/27/2025 in #help
Json Serializing And Deserializing Practice Errors
And go from there.
60 replies
CC#
Created by KIRA BELMONT on 3/27/2025 in #help
Json Serializing And Deserializing Practice Errors
Try it with very simple data types first. Change the Ingredient class just to have very simple get/set properties.
60 replies
CC#
Created by KIRA BELMONT on 3/27/2025 in #help
Json Serializing And Deserializing Practice Errors
Don't take it as a personal failing! It's just that you've taken on an advanced challenge.
60 replies
CC#
Created by KIRA BELMONT on 3/27/2025 in #help
Json Serializing And Deserializing Practice Errors
Hah 🙂
60 replies
CC#
Created by KIRA BELMONT on 3/27/2025 in #help
Json Serializing And Deserializing Practice Errors
Like, you jumped straight to a 300-level concept without going through 100-level or 200-level introductions.
60 replies
CC#
Created by KIRA BELMONT on 3/27/2025 in #help
Json Serializing And Deserializing Practice Errors
I'll say: it is very uncommon to mix serialization + inheritance. It really is an advanced scenario. Which is why we're all perplexed as to why you're stating both that you've never worked with this type of serialization before and that you have to use inheritance.
60 replies
CC#
Created by KIRA BELMONT on 3/27/2025 in #help
Json Serializing And Deserializing Practice Errors
^^^ But if you really need to deserialize polymorphic classes, this link gives you all the details. The example at the very top of the document should get you started.
60 replies
CC#
Created by KIRA BELMONT on 3/27/2025 in #help
Json Serializing And Deserializing Practice Errors
Can't you take Name, Id, Instructions as constructor parameters and just have a single data type?
60 replies
CC#
Created by KIRA BELMONT on 3/27/2025 in #help
Json Serializing And Deserializing Practice Errors
For example, do you really need lots of derived types hanging off the Ingredient class?
60 replies
CC#
Created by KIRA BELMONT on 3/27/2025 in #help
Json Serializing And Deserializing Practice Errors
But polymorphism is something of an advanced topic when it comes to deserialization, which is why my earlier recommendation was to avoid it if there's any possible way for you to do so.
60 replies
CC#
Created by KIRA BELMONT on 3/27/2025 in #help
Json Serializing And Deserializing Practice Errors
So you need to configure the deserializer to tell it the equivalent of "don't say new Ingredient(...). Say new MyDerivedClass(...) instead!"
60 replies
CC#
Created by KIRA BELMONT on 3/27/2025 in #help
Json Serializing And Deserializing Practice Errors
To cotton's point, consider that the deserializer is going to try doing something equivalent to this:
List<Ingredient> list = new List<Ingredient>();
list.Add(new Ingredient()); // <-- ERROR: cannot instantiate an abstract class
List<Ingredient> list = new List<Ingredient>();
list.Add(new Ingredient()); // <-- ERROR: cannot instantiate an abstract class
60 replies
CC#
Created by Eple on 2/27/2025 in #help
Foreign text in my app
I don't know what would have caused it, but that's the issue at least.
6 replies
CC#
Created by Eple on 2/27/2025 in #help
Foreign text in my app
It's an endianness issue. The string shown in your debugger is literally this:
pt>
function scriptLoaded() {
$("#field_
pt>
function scriptLoaded() {
$("#field_
But with the bytes of each UTF-16 char swapped.
6 replies
CC#
Created by Puck on 10/28/2024 in #help
Any custom TLS client that has minor implementation of HTTP with custom cipher suite support?
I'd recommend opening a discussion in dotnet/runtime if you want further assistance for this. The feature owners who are knowledgeable in this area are not on this Discord server.
12 replies
CC#
Created by Puck on 10/28/2024 in #help
Any custom TLS client that has minor implementation of HTTP with custom cipher suite support?
But mercifully I've brain dumped everything about it.
12 replies
CC#
Created by Puck on 10/28/2024 in #help
Any custom TLS client that has minor implementation of HTTP with custom cipher suite support?
I remember code reviewing it. 🙂
12 replies
CC#
Created by Puck on 10/28/2024 in #help
Any custom TLS client that has minor implementation of HTTP with custom cipher suite support?
I'd ask Krzysztof then. Because there was definitely support for this added, including backporting to netfx 4.8.
12 replies
CC#
Created by Puck on 10/28/2024 in #help
Any custom TLS client that has minor implementation of HTTP with custom cipher suite support?
There should be an extensibility hook on HttpClient which allows you to specify the client auth options, but the name of that hook escapes me at the moment. Miha would probably know for certain.
12 replies
CC#
Created by Puck on 10/28/2024 in #help
Any custom TLS client that has minor implementation of HTTP with custom cipher suite support?
Should work on both Linux + Win
12 replies