serializing non-string objects