You can do 2 things:
1) Create a class with every thing you want, populate it with the your vendor class, then you serialize it.
Check adapter design pattern
2) Use Json.Net. Once I need to serialize the IPagedList that have metadata and I did this:
public static string SerializePagedList(IPagedList<T> pagedList)
{
string result = JsonConvert.SerializeObject(
// new anonymous class with everything I wanted
new
{
Items = pagedList,
MetaData = pagedList.GetMetaData()
},
new JsonSerializerSettings
{
NullValueHandling = NullValueHandling.Ignore,
ReferenceLoopHandling = ReferenceLoopHandling.Ignore
});
return result;
}
I hope that it helps.