moving serializer to api as plugin.

I'm not sure if this is beter or worse...