Tweak conversion to work better with Rails's serializers.