Skip to content
No description or website provided.
C# Shell
Find file
Latest commit 0dfcc60 @paultyng Update readme.markdown
Failed to load latest commit information.
FluentJson.Tests circular reference detection, test with mocking framework
FluentJson remove nupkg
Coverage.testsettings Initial version of Knockout.ToViewModel
FluentJson.NET.sln Moved to SemVer model of versioning, pushed new nuget package with To…
Local.testsettings Initial version of Knockout.ToViewModel
license.txt add license.txt
readme.markdown Update readme.markdown


A Fluent JSON library for building Knockout view models (or any other JSON object) built on top of JSON.NET.

You can create JSON in a Razor view like this (note the Knockout extension methods):

        .AddProperty("name", "value")
        .AddProperty("childObject", c => {
            .AddProperty("childProperty", "value2")
        .AddObservable("knockoutProperty", 123)

This would produce JSON similar to this:


The Knockout methods are added via extension methods and other things can easily extend as well. There are additional Knockout extensions that allow you to quickly map an entire class on the server to a Knockout ViewModel:

@Knockout.ToViewModel(new { name1 = "value1", name2 = 2 })

Would produce:


You can get the package from the NuGet Gallery:

PM> Install-Package

Please feel free to comment, criticize or log issues on GitHub

Something went wrong with that request. Please try again.