Skip to content

Instantly share code, notes, and snippets.

@justinyoo
Last active December 2, 2015 00:09
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 justinyoo/f6a451c44b34bcb62f28 to your computer and use it in GitHub Desktop.
Save justinyoo/f6a451c44b34bcb62f28 to your computer and use it in GitHub Desktop.
CRM 2015 Filtering Sample
public class JsonFilterItemCollection : FilterItemCollection
{
...
protected override void OnInitialising(string filename)
{
using (var reader = File.OpenText(filename))
{
var settings = new JsonSerializerSettings();
settings.ContractResolver = new CamelCasePropertyNamesContractResolver();
this.Filter = JsonConvert.DeserializeObject<Filter>(reader.ReadToEnd(), settings);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment