Can serialize objects with constructors having parameters