decode method
Insert gson to decode
Implementation
dynamic decode(dynamic gson) {
GsonParsable p = gson is GsonParsable ? gson : gson is String ? new GsonParsable(gson) : throw ("The gson is not a valid input to decode an Array from");
if(p.actual() == "{") { return decodeMap(p); }
else if(p.actual() == "[") { return decodeArray(p); }
else if(new RegExp(r"[0-9\.]").hasMatch(p.actual())) { return decodeNumber(p); }
else if(p.actual() == "\"" || p.actual() == "'" || _PURE_STRING.hasMatch(p.actual())) { return decodeString(p); }
else { throw p.error("Unexpected character "+p.actual()); }
}