Struct#to_h is not available in Ruby 1.9
Removes empty attributes and truncates long attributes.
[Validate]