package com.luticate.utils.dbo;

import org.json.JSONException;
import org.json.JSONObject;

import java.util.HashMap;

/**
 * Created by robin on 11/27/15.
 */
public abstract class LuDbo {

    public abstract void fromJson(JSONObject json) throws JSONException;

    public abstract HashMap<String, Object> toArray();

    public JSONObject toJson()
    {
        return new JSONObject(toArray());
    }

    @Override
    public String toString() {
        return toJson().toString();
    }
}
