Closed rbishop-bah closed 11 years ago
So I have some code with some JsonObjects that was working fine up until very recently. Now I'm getting errors when I try to access properties via dot notation. Consider this debugging code, in which entity is a JsonObject:
try { print(entity is JsonObject); print(entity["id"]); print(entity["name"]); print(entity.name); print(entity.id); } catch(e) { print(e); }
prints...
true 744 Situational Awareness
=== and then throws a NoSuchMethodError ===
Throws the error if I try entity.id first also.
entity.id
I think something important may have broken in the latest json_object/Dart release combo.
My objects extend JsonObject<MyClass>, if that helps.
JsonObject<MyClass>
In the short term, I think that this is fixed with the latest pub version 1.0.15+1. Please re-open if not.
Confirmed issue resolved by 1.0.15+1. Thanks for the quick fix!
So I have some code with some JsonObjects that was working fine up until very recently. Now I'm getting errors when I try to access properties via dot notation. Consider this debugging code, in which entity is a JsonObject:
prints...
=== and then throws a NoSuchMethodError ===
Throws the error if I try
entity.id
first also.I think something important may have broken in the latest json_object/Dart release combo.
My objects extend
JsonObject<MyClass>
, if that helps.