This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AUTO GENERATE SIMPLE UNIQUE ID'S FOR NON-EMPTY ROWS | |
// | |
// Author: Carlos Perez, [email protected] | |
// | |
// Purpose: This Google Sheets script fires when any cell is edited and | |
// inserts a random uuid (generated via Google Sheets's provided getUuid utility) | |
// into the specified ID_COLUMN. For instance if the first column in the | |
// sheet specified by SHEETNAME is the column where you would like the | |
// UID injected, then ID_COLUMN should be 1. | |
// |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class JSONUnkownFields { | |
public Map<String,Object> jsonFields; | |
protected abstract void parseKnownFields; | |
public JSONUnkownFields(String jsonString) { | |
jsonFields = (Map<String, Object>)JSON.deserializeUntyped(jsonString); | |
parseKnownFields(); | |
} | |