Serializers to api mappers

In the effort of keeping responsibilities clear we split the json serializing and the api key / value mapping into different objects.

This makes the internal api a bit less cringey.