MagicJinn
Explore posts from serversForce Newtonsoft to deserialize into certain formats
When you specify Dictionary<string,object>, it'll convert nested objects to JObjects (or List<JObject>), that I know for sure. When I try to patch the existing methods in the game to deserialize into custom classes, I get non-descript errors, but I'm assuming that's what is happening as well. I can't be certain though, and I'd have to do more testing. I've temporarily given up on it though, since for some reason, when using Newtonsoft, seemingly unrelated methods fail spectacularly at random intervals.
36 replies
Force Newtonsoft to deserialize into certain formats
Because it's generic object and doesn't carry a type in JSONWell JsonFx and Newtonsoft have different behaviour in this case. JsonFx deserializes nested objects into T or List<T>, and Newtonsoft into JObject and List<JObject>. I'm not entirely sure how the wiki page you sent helps me with that.
36 replies
Force Newtonsoft to deserialize into certain formats
For performance reasons. I've tried my very, VERY best to use Swifter.Json, which doesn't have this problem and is faster, but it doesn't work at all. I'm modding a game that has a massive bottleneck in loading times because of JsonFx.
36 replies
Utf8Json or Jil for Net3.5
[Info : Console] Error occurred while processing JSON for 'events': Could not load file or assembly 'System.Runtime.Serialization, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its dependencies.With Newtonsoft :)
37 replies
Utf8Json or Jil for Net3.5
True. I think I can iron out the kinks when I get it running though. Problem is that I haven't gotten this stuff to run a single time. Although it might not look like it from this thread, I'm pretty decent at coding, and when I encounter a problem, I'm persistent in solving it. The problem here is that this is a problem that I've never heard of and doesn't really make sense, and seemingly nobody else has had this problem either.
37 replies
Utf8Json or Jil for Net3.5
The developers over at Failbetter games are not known for being good at coding. JsonFx is quite slow, but that only compounds the effect of their lack of optimisation. They've been using the same system for ages... And the tech debt is really weighing the system down. Deserializing into List<Failbetter.Core.Event>> takes 8 seconds, List<Dictionary<string,object>> takes 2.
37 replies