package com.ccwangluo.ccim.database;

import androidx.room.TypeConverter;

import com.ccwangluo.ccim.modle.User;
import com.google.gson.Gson;

public class UserConverter {
    @TypeConverter
    public User jsonToModel(String json) {
        return new Gson().fromJson(json,User.class);
    }

    @TypeConverter
    public String modelToJson(User user) {
        return new Gson().toJson(user);
    }
}
