package helper;

import com.yanzuoguang.util.helper.JsonHelper;
import com.yanzuoguang.util.vo.MapRow;
import org.junit.Assert;
import org.junit.Test;

public class TestJson {

    @Test
    public void test() throws Exception {
        MapRow map1 = new MapRow();
        map1.put("m1", "a");
        MapRow map = new MapRow();
        map.put("k1", map1);
        map.put("k2", map1);
        String json = JsonHelper.serialize(map);
        Assert.assertEquals(json, "{\"k1\":{\"m1\":\"a\"},\"k2\":{\"m1\":\"a\"}}");
    }
}