aschuma

JAVA :: GSON :: Annotation

Aug 24th, 2015
156
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.26 KB | None | 0 0
  1. import com.google.gson.annotations.SerializedName;
  2.  
  3. public class JsonRpcABCRequest {
  4.  @SerializedName("propertyA")
  5.  private String pA = "valueA";
  6.  
  7.  @SerializedName("propertyB")
  8.  private String pB = "valueB";
  9. }
  10.  
  11. new Gson().toJson(new JsonRpcABCRequest())
Advertisement
Add Comment
Please, Sign In to add comment