package com.gh.gamecenter.room.converter;

import androidx.room.TypeConverter;

import com.gh.gamecenter.core.utils.GsonUtils;
import com.gh.gamecenter.qa.entity.Questions;

/**
 * Created by khy on 18/04/18.
 */

public class QuestionsConverter {
    @TypeConverter
    public static String toQuestionsString(Questions data) {
        return GsonUtils.toJson(data);
    }

    @TypeConverter
    public static Questions toQuestions(String token) {
        return GsonUtils.fromJson(token, Questions.class);
    }
}
