Plans to change to JSon.net

Aug 31, 2012 at 5:43 AM

Hi:

Firstly this is a fantastic library, thanks.

Are there any plans now that asp.net mvc4 has been released to change the JSon serialization code to use JSon.net?

I'm happy to do this and submit a push.

Cheers

Sean.

Coordinator
Aug 31, 2012 at 6:33 PM

At present I'm debating adding 3rd party libraries as dependencies. I'm leaning towards no at the moment (I actually had a much longer response that I'm going to post on my website that gives my reasons on that). But basically the idea of this library was to just rely on .Net and maybe Win32/COM objects. As such I'm probably never going to directly plug in 3rd party libraries. Even with certain libraries being blessed, it's still a third party dependency.

That being said, I'm considering a rewrite of certain sections (not this next version but maybe a version after that). The front end extension methods would remain mostly the same (maybe simplified a bit on some of them but I'm generally happy with the front end), but the back end would be modified. The general idea is to make it so that people can plug in their own libraries and use the extensions as a shell in certain situations. So if you wanted Json.Net to do the serialization (or ServiceStack or whatever), but wanted to use the extension methods that I have here then you'd be able to. I'm still designing how that would work though.

Anyway, if you have feedback or suggestions, I'm 100% open to it. And if you do want to make a fork and add Json.Net serialization that's great (part of the reason I switched to Mercurial was so people could do that sort of stuff), but I'm probably not going to merge it into the main library(well until I get the plugin system working anyway).

James Craig

Aug 31, 2012 at 6:48 PM

Hi:

What are you thinking regarding the implementation of pluging?

Cheers

Sean.

From: JaCraig [email removed]
Sent: 31 August 2012 19:34
To: Sean Farrow
Subject: Re: Plans to change to JSon.net [CUL:393851]

From: JaCraig

At present I'm debating adding 3rd party libraries as dependencies. I'm leaning towards no at the moment (I actually had a much longer response that I'm going to post on my website that gives my reasons on that). But basically the idea of this library was to just rely on .Net and maybe Win32/COM objects. As such I'm probably never going to directly plug in 3rd party libraries. Even with certain libraries being blessed, it's still a third party dependency.

That being said, I'm considering a rewrite of certain sections (not this next version but maybe a version after that). The front end extension methods would remain mostly the same (maybe simplified a bit on some of them but I'm generally happy with the front end), but the back end would be modified. The general idea is to make it so that people can plug in their own libraries and use the extensions as a shell in certain situations. So if you wanted Json.Net to do the serialization (or ServiceStack or whatever), but wanted to use the extension methods that I have here then you'd be able to. I'm still designing how that would work though.

Anyway, if you have feedback or suggestions, I'm 100% open to it. And if you do want to make a fork and add Json.Net serialization that's great (part of the reason I switched to Mercurial was so people could do that sort of stuff), but I'm probably not going to merge it into the main library(well until I get the plugin system working anyway).

James Craig

Coordinator
Aug 31, 2012 at 8:51 PM

The design at present is sort of in very early stages. But basically it's leaning towards a mixture of MEF, IoC, a bit of layering, and extension points (events) that you can attach to. So in the case of the serialization, there would be a layer that would actually do the work that could be swapped out using an IoC container. Like I said though, it's very early design stages (although will probably start progressing as I'm going to release the next version this weekend [assuming I get some free time]).

James Craig

Aug 31, 2012 at 9:00 PM

Hi:

Ok, it would be nice with the ioc stuff if this was swappable.

I’ll clone the repo and take a look.

Chers

Sean.

From: JaCraig [email removed]
Sent: 31 August 2012 21:52
To: Sean Farrow
Subject: Re: Plans to change to JSon.net [CUL:393851]

From: JaCraig

The design at present is sort of in very early stages. But basically it's leaning towards a mixture of MEF, IoC, a bit of layering, and extension points (events) that you can attach to. So in the case of the serialization, there would be a layer that would actually do the work that could be swapped out using an IoC container. Like I said though, it's very early design stages (although will probably start progressing as I'm going to release the next version this weekend [assuming I get some free time]).

James Craig