dartwatch-JsonObject
dartwatch-JsonObject copied to clipboard
Type information
I was thinking about adding a property "__type" (iirc this is how other systems do it), to know what concrete type is just serialized. This is useful for when you expect to receive polymorhpic objects which you don't know where to instantiate from. Currently, there is no reflection, so I use object.toString() to retrieve the concrete type name, while not overriding toString() anywhere (I introduced toText(), this also has other advantages)
I have this "feature" already in my adoption of JsonObject. If there is any interest, I can provide a patch.
Hi, Sorry for the delay getting back to you. Yes, this sounds interesting - could you provide a patch.
Thanks.
FYI: I'm busy, I expect to do dart again within a few weeks. Haven't forgot it ;).