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])); } }
public static SheetPage FromJson(string json) { SheetPageJsonable jsonable = JsonUtility.FromJson <SheetPageJsonable>(json); return(new SheetPage(jsonable)); }
public string ToJson() { SheetPageJsonable jsonable = new SheetPageJsonable(this); return(JsonUtility.ToJson(jsonable)); }