The code should already work with collections. The ToJson extension just creates a standard JavaScriptSerializer and registers the Converter. The MS serializer is responsible for for creating and calling the correct converter. The serializer should see the EntityCollection as IEnumerable and create an array, then call this converter for each element.
So this should work:
LLBLGenWebExtension.CreateJavaScriptSerializer().Serialize(yourEntityCollection);
Adding an extension to the attached source would be:
public static string ToJson(this IEntityCollection coll)
{
return CreateJavaScriptSerializer().Serialize(coll);
}
For Deserialize, any Json array comes out as an IList (I believe), which can then be used to construct an EntityCollection.
As to your comments on LLBLGen supporting more serialization techniques, I totally agree, I have had issues "selling" LLBLGen because folks want to use the latest/"greatest". IMHO, LLBLGen is the best of the best for O/R mappers out there. The smallest inputs reap incredible productivity gains.
A lot of developers out there are looking for frictionless integration with all the MS frameworks and having LLBLGen not support them "out of the box" causes it to get passed up. Even though MS tools have issues, many will not look at other tools if a feature is not on the datasheet.
I also understand that Frans and team are not able to create and support the myriad of changing technologies coming out of MS. Expecially when they keep changing their mind.
Frans has been very supportive of community members adding support (I have also added support for ADO.NET Data Services IUpdateable and the ASP.NET MVC Model Binder). However, finding solutions to these in the forums is not always easy. Many threads just end with "we do not want to support x feature, but you can add it yourself". This is dissapointing because you just need to get something working and having to fight your way through sucks.
It would be nice if we (as a community) could get together and add more formalized support on top of LLBLGen and then have Frans and co make them available as "recommended" solutions, not just links back to other forum threads
I am sure many of the things we need done will be a lot easier to do and share with the 3.0 release.
Brian