chrisbu / dartwatch-JsonObject

JsonObject which allows dot notation access to JSON.parse'd objects. Read the article on http://www.dartlang.org/articles/json-web-service/
http://www.dartlang.org/articles/json-web-service/
MIT License
83 stars 25 forks source link

DOT ACCESS BROKEN??? #26

Closed rbishop-bah closed 11 years ago

rbishop-bah commented 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.

I think something important may have broken in the latest json_object/Dart release combo.

My objects extend JsonObject<MyClass>, if that helps.

chrisbu commented 11 years ago

In the short term, I think that this is fixed with the latest pub version 1.0.15+1. Please re-open if not.

rbishop-bah commented 11 years ago

Confirmed issue resolved by 1.0.15+1. Thanks for the quick fix!