You can't use a datacontract serializer to perform this serialization, because an anonymous type doesn't define any contract.
DataContractSerializers use [DataContract] and [DataMember] attributes to decide which properties should be serialized. However, as anonymous types are compiler generated, they can't receive attributes.
[DataContract]
class Data
{
[DataMember]
public string Category{get;set;}
[...]
}
In fact, my opinion is that you are doing something wrong if your interfaces between client and server are defined through anonymous types.
You could certainly use another serializer to perform this task however, but I don't know of any serializing any public properties recursively without any annotations. ;)
EDIT:
In fact I know exactly what you could use to serialize arbitrary (and therefore anonymous) classes into json. Use the marvellous Json.NET Library.