Skip to content
Browse files

added a note on hwo to parse jsonString and about JsonProperty to cus…

…tomize names
  • Loading branch information...
1 parent 6355439 commit 5646b9384a1a4e969c09ba4b4c287f1c6e9efa92 @mkristian mkristian committed
Showing with 11 additions and 0 deletions.
  1. +11 −0 restygwt-website/src/documentation/
11 restygwt-website/src/documentation/
@@ -237,6 +237,10 @@ Then you use it as follows
// decoding an object to from json
PizzaOrder other = codec.decode(json);
+In case you need to parse the JSON from a String use
+ JSONValue json = JSONParser.parseStrict( jsonString );
### Customizing the JSON Property Names
If you want to map a field name to a different json property name, you
@@ -247,6 +251,13 @@ can use the `@Json` annotation to configure the desired name. Example:
public String messageId;
+or with the jackson annotation
+ public class Message {
+ @JSONProperty("message-id")
+ public String messageId;
+ }
### Using readonly objects
If you want to declare final fields and initialize an object through its constructor,

0 comments on commit 5646b93

Please sign in to comment.
Something went wrong with that request. Please try again.