SkywardApps / popcorn

Popcorn is a .Net Middleware for your RESTful API that allows your consumers to request exactly as much or as little as they need, with no effort from you.
https://skywardapps.github.io/popcorn/
MIT License
59 stars 19 forks source link

Support 'Expanding' a Dictionary<string, ?> into a strong type #29

Closed undiwahn closed 6 years ago

undiwahn commented 7 years ago

We want to support the scenario where the destination type is a strong type (eg 'Car') but the source is a dictionary. The simple implementation is to take each key in the dictionary and try to write it to a property in the target type. This is the same as Expand currently does, but instead of iterating over the source's properties we'd need to iterate over its keys.

alexbarbato commented 7 years ago

If no one grabs this, once I finish #30 (should be early tomorrow) I'll hop onto this as they are similar in a lot of ways.