When serializing, if is an object cast into array