Serialization of complex types
I have a class Customer which has customer's properties, and I have a
class Order which has order's properties, one of which is also
property Customer of type Customer.
After serialization of the Orders I end up with a XML that has all the
properties of each order, and also all the properties of the customers
of these orders.
What I would like to do is:
- when serializing Order I want order's base properties and customer's
id as the value of the Customer property (I don't want to serialize
the whole Customer object when serializing Order)
- when serializing Customer I want to serialize all properties of the
Can this be done by setting a tag to the order's Customer property
(something similar to XMLIgnore, but just to let know the serializer
to only serialize the ID of the Customer) or some other way?
Thanks & Regards,
|All times are GMT. The time now is 12:53 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.