Skip to content

Instantly share code, notes, and snippets.

@couchand
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save couchand/c2c9249446d6071985da to your computer and use it in GitHub Desktop.
Save couchand/c2c9249446d6071985da to your computer and use it in GitHub Desktop.
Jil Deserialization reduced test case

Running against Jil 2.5.2.0 in a fresh project, this code throws a JilDeserializationException on line 24 with the message Expected character: '"' and SnippetAfterError set to the string "}".

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Jil;
namespace JilDeserializeIssue
{
public enum SelectionAlgorithm : int
{
}
public class Priority
{
public SelectionAlgorithm SelectionAlgorithm;
}
class Program
{
static void Main(string[] args)
{
var input = "{\"SelectionAlgorithm\":0}";
var res = JSON.Deserialize<Priority>(input);
Console.Write(res);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment