Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support accessing type arguments from smoke #20584

Closed
DanTup opened this issue Aug 19, 2014 · 3 comments
Closed

Support accessing type arguments from smoke #20584

DanTup opened this issue Aug 19, 2014 · 3 comments
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

Comments

@DanTup
Copy link
Collaborator

DanTup commented Aug 19, 2014

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!

@sethladd
Copy link
Contributor

cc @blois.
cc @sigmundch.
Added Area-Pkg, Pkg-Smoke, Triaged labels.

@sethladd
Copy link
Contributor

@DanTup DanTup added Type-Enhancement area-pkg Used for miscellaneous pkg/ packages not associated with specific area- teams. labels Aug 19, 2014
@DartBot
Copy link

DartBot commented Jun 5, 2015

This issue has been moved to dart-archive/smoke#15.

@DartBot DartBot closed this as completed Jun 5, 2015
@kevmoo kevmoo added type-enhancement A request for a change that isn't a bug and removed triaged labels Mar 1, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

4 participants