I run simple deserialization into own type Event with :
JSON.Deserialize<Event>(text);
with exception:
An exception of type 'Jil.DeserializationException' occurred in Jil.dll but was not handled in user code.
Additional information: Expected character: '\'
Newtonsoft's JSON deserialization works well on the same json, also JSONLint confirmed JSON is valid. Any clues here ? I tried passing in string, as well as using using(StringReader) as is suggested on JIL's github page.
Without seeing the JSON-String, you try to deserialize i am not sure about this, but eventually the deserializer expects the date(time) that you're trying to deserialize to be in another format (I guess you're trying to deserialize a datetime-field).
It seems that JIL assumes, that datetimes are delivered as 'NewtosoftDateTime', but you are delivering another format. See https://github.com/kevin-montrose/Jil/blob/master/Jil/Deserialize/InlineDeserializer.cs#L667 for detailed infos, how jil assumes your date is formatted.
You can change the expected formatting via Options. See more here: https://github.com/kevin-montrose/Jil/blob/master/Jil/Options.cs
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With