title: Wrong decode() from redstone_mapper about observable object in web app
body: <p>I have different results of using decode() from redstone.dart with object which has observable fields in console and web applications. </p>
  
  <p>My console app has
  <strong>pubspec.yaml</strong></p>
  
  <pre><code>name: 'redstone_decode'
  version: 0.0.1
  description: console app
  environment:
    sdk: '&gt;=1.0.0 &lt;2.0.0'
  dependencies:
    redstone: any
    redstone_mapper: any
    observe: any
  transformers:
  - redstone_mapper # http://redstonedart.org/doc/redstone_mapper.html
  - observe:
      entry_points: bin/main.dart
  </code></pre>
  
  <p><strong>main.dart</strong></p>
  
  <pre><code>import 'dart:convert' show JSON;
  import 'package:redstone_mapper/mapper.dart';
  import 'package:redstone_mapper/mapper_factory.dart';
  import 'package:observe/observe.dart';
  
  class User extends Object with Observable {
    @Field()
      @observable
        String username;
    @observable
      @Field()
        String password;
  }
  
  void main() {
    bootstrapMapper();
    User user = new User()
      ..username = "user"
      ..password = "pass";
    String userJson = JSON.encode(encode(user));
    User user1 = decode({
      "username":"user",
      "password":"pass",
      "ERROR":"error"}, User);
    String userJson1 = JSON.encode(encode(user1));
    print(' after decode() '+ userJson1);
  }
  </code></pre>
  
  <p>And it works right. Result in console is:   </p>
  
  <pre><code>after decode() {"username":"user","password":"pass"}
  </code></pre>
  
  <p>I made web app from template "An absolute bare-bones web app".
  It has <strong>pubspec.yaml</strong></p>
  
  <pre><code>name: 'redstone_decode'
  version: 0.0.1
  description: An absolute bare-bones web app.
  environment:
    sdk: '&gt;=1.0.0 &lt;2.0.0'
  dependencies:
    browser: '&gt;=0.10.0 &lt;0.11.0'
    redstone: any
    redstone_mapper: any
    observe: any
  transformers:
  #- redstone_mapper http://redstonedart.org/doc/redstone_mapper.html
  - observe:
      entry_points: web/index.html
      entry_points: web/main.dart
  </code></pre>
  
  <p><strong>main.dart</strong></p>
  
  <pre><code>import "dart:html";
  import 'dart:convert' show JSON;
  import 'package:redstone_mapper/mapper.dart';
  import 'package:redstone_mapper/mapper_factory.dart';
  import 'package:observe/observe.dart';
  
  class User extends Object with Observable {
    @Field()
      @observable
        String username;
    @observable
      @Field()
    String password;
  }
  
  void main() {
    bootstrapMapper();
    User user = new User()
      ..username = "user"
      ..password = "pass";
    String userJson = JSON.encode(encode(user));
    User user1 = decode({
      "username":"user",
      "password":"pass",
      "ERROR":"error"}, User);
    String userJson1 = JSON.encode(encode(user1));
    querySelector('#output').text = ' after decode() '+ userJson1;
  }
  </code></pre>
  
  <p>Result in Dartium</p>
  
  <pre><code>after decode() {}
  </code></pre>
  
  <p>Any ideas?</p>