Support accessing type arguments from smoke #20584
Labels
area-pkg
Used for miscellaneous pkg/ packages not associated with specific area- teams.
type-enhancement
A request for a change that isn't a bug
I'm trying to use smoke for some simple JSON parsing. It all works fine; except that when a type I'm deserialising into has a List<x>, it seems that smoke does not provide any ability to get at the generic type.
Currently I'm working around this (it's just a prototype) by hard-coding a list of the types I know I'm deserialising lists of:
var s = smoke.nameToSymbol(k);
var d = smoke.getDeclaration(t, s);
if (d.type.toString() == "List<ClientGridColumn>")
smoke.write(obj, s, v.map((sv) => Serializable.fromJson(ClientGridColumn, sv)).toList());
This obviously isn't a scalable solution. It seems like this is the sort of thing that should be possible with smoke; so I hope it might be considered!
The text was updated successfully, but these errors were encountered: