Fix bug in code sample

Review URL: https://codereview.chromium.org//13581006

git-svn-id: https://dart.googlecode.com/svn/branches/bleeding_edge/dart@20897 260f80e4-7a28-3924-810f-c04153c831b5
This commit is contained in:
alanknight@google.com 2013-04-03 22:01:08 +00:00
parent 2be466ad31
commit c0eea0c042

View file

@ -16,13 +16,15 @@
* address.city = 'Seattle';
* var serialization = new Serialization()
* ..addRuleFor(address);
* String output = serialization.write(address);
* Map output = serialization.write(address);
*
* This creates a new serialization and adds a rule for address objects. Right
* now it has to be passed an address instance because of limitations using
* Address as a literal. Then we ask the Serialization to write the address
* Address as a literal. Then we ask the [Serialization] to write the address
* and we get back a Map which is a [json]able representation of the state of
* the address and related objects.
* the address and related objects. Note that while the output in this case
* is a [Map], the type will vary depending on which output format we've told
* the [Serialization] to use.
*
* The version above used reflection to automatically identify the public
* fields of the address object. We can also specify those fields explicitly.