Adds user serializer for customising the json output