Replace es_app_to_dict with a Serializer (bug 945820)