Convert to array before we sent json out if the class supports it