Skip to content

Latest commit

 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 

Repository files navigation

JSON Dictionary Binding

This project contains a custom ModelBinder and ValueProviderFactory for binding JSON dictionaries to MVC models.

Usage is simple. Modify your Global.asax.cs file to replace the standard MVC3 JsonValueProviderFactory with the ExtendedJsonValueProviderFactory. Then, if you have a JSON dictionary of a type other than Dictionary<string, object>, you can either use the TypedDictionaryModelBinder in your Controller's action method declaration, or you can set the binding for your typed dictionary in the Global.asax.cs file.

An example page can be seen at this page at Form.Vu.

Thanks to Jeroen, whose blog post here inspired me to revisit and fix my ExtendedJsonValueProviderFactory.

About

A small project including an updated ValueProvider and ModelBinder to permit binding JSON dictionaries to MVC models.

Resources

Stars

3 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages