Revision: 9221
Author: [email protected]
Date: Fri Nov 12 20:08:46 2010
Log: Edited wiki page AutoBean through web user interface.
http://code.google.com/p/google-web-toolkit/source/detail?r=9221
Modified:
/wiki/AutoBean.wiki
=======================================
--- /wiki/AutoBean.wiki Fri Nov 5 09:42:49 2010
+++ /wiki/AutoBean.wiki Fri Nov 12 20:08:46 2010
@@ -189,6 +189,8 @@
== JSON structures ==
+The AutoBean framework can be used as a JSON interoperability layer to
provide a Java typesystem wrapper around an existing JSON api or to create
JSON payloads to interact with a remote service. This is accomplished by
designing the Java APIs according to the JSON schema. The `...@propertyname`
annotation can be applied to getters and setters where the Java naming
convention does not align with the JSON schema.
+
Generally speaking, the serialized form of an object emitted by
AutoBeanCodex mirrors the interface declaration. For instance, the example
Person interface described in the quckstart section of this document might
be serialized as:
{{{
@@ -212,6 +214,8 @@
{{{
[ [ { "name" : "John Doe" } , { "name" : "Jim Smith" } ] , [
{ "street" : "1234 Maple Ave" }, { "street" : "5678 Fair Oaks Lane" } ] ]
}}}
+
+Java enum values are written out as the string name of the enum value.
This can be overridden by applying the `PropertyName` annotation to the
enum field declaration. The use of names instead of ordinal values will
allow the payloads to be robust against endpoint schema skew.
== Categories ==
--
http://groups.google.com/group/Google-Web-Toolkit-Contributors