示例#1
0
        public SheetPage(SheetPageJsonable jsonable)
        {
            sheetName = jsonable.sheetName;
            index     = jsonable.index;

            columns = new List <SheetColumn>(jsonable.columns.Length);
            for (int i = 0; i < jsonable.columns.Length; i++)
            {
                columns.Add(new SheetColumn(jsonable.columns[i]));
            }

            rows = new List <SheetRow>(jsonable.rows.Length);
            for (int i = 0; i < jsonable.rows.Length; i++)
            {
                rows.Add(new SheetRow(this, jsonable.rows[i]));
            }
        }
示例#2
0
        public static SheetPage FromJson(string json)
        {
            SheetPageJsonable jsonable = JsonUtility.FromJson <SheetPageJsonable>(json);

            return(new SheetPage(jsonable));
        }
示例#3
0
        public string ToJson()
        {
            SheetPageJsonable jsonable = new SheetPageJsonable(this);

            return(JsonUtility.ToJson(jsonable));
        }