package com.github.gfx.static_gson.example;

import com.bluelinelabs.logansquare.annotation.JsonField;
import com.bluelinelabs.logansquare.annotation.JsonObject;
import com.github.gfx.static_gson.annotation.JsonSerializable;

import java.util.Date;

@JsonObject
@JsonSerializable
public class Session {

    @JsonField
    public int id = 41;

    @JsonField
    public String title = "The Basics of JSON";

    @JsonField
    public String description
            = "How to handle JSON in Android Applications with JSON processing libraries.\n"
            + "There are a lot of JSON processing libraries: org.json, Gson, JsonPullParser, Moshi, LoganSquare\n"
            + "Some uses annotation processing while the other uses reflection.\n"
            + "blah blah blah blah...";

    @JsonField
    public long speakerId = 42;

    @JsonField
    public long startTime = new Date().getTime();

    @JsonField
    public long endTime = new Date().getTime();

    @JsonField
    public long categoryId = 43;

    @JsonField
    public long placeId = 44;

    @JsonField
    public String languageId = "en";

    @JsonField
    public Asset slideUrl = Asset.create("slide", "http://example.com/slide");

    @JsonField
    public Asset movieUrl = Asset.create("movie", "http://example.com/movie");

    @JsonField
    public Asset shareUrl = Asset.create("share", "http://example.com/share");

    @JsonField
    public boolean checked = false;

    @JsonObject
    @JsonSerializable
    public static class Asset {

        public String label;

        public String url;

        public static Asset create(String label, String url) {
            Asset asset = new Asset();

            asset.label = label;
            asset.url = url;

            return asset;
        }
    }
}

@@ -236,20 +236,68 @@
 va.util.
-Date
+Arrays;%0Aimport java.util.Date;%0Aimport java.util.List
 ;%0A%0A@Json
@@ -445,16 +445,37 @@
  of JSON
+ processing libraries
 %22;%0A%0A    
@@ -821,16 +821,142 @@
      + %22
+If you want a high performance JSON processing library, you should find annotation processing ones,%5Cn%22%0A            + %22because 
 blah bla
@@ -1003,20 +1003,23 @@
 lic 
-long
+Speaker
  speaker
 Id =
@@ -1018,15 +1018,24 @@
 aker
-Id
  = 
-42
+new Speaker()
 ;%0A%0A 
@@ -1189,20 +1189,24 @@
  public 
-long
+Category
  categor
@@ -1210,15 +1210,25 @@
 gory
-Id
  = 
-43
+new Category()
 ;%0A%0A 
@@ -1256,25 +1256,30 @@
 lic 
-long placeId = 44
+Room room = new Room()
 ;%0A%0A 
@@ -1360,24 +1360,55 @@
 lic 
-Asset slideUrl =
+List%3CAsset%3E assets = Arrays.asList(%0A           
  Ass
@@ -1457,53 +1457,21 @@
 de%22)
-;%0A
+,
 %0A    
-@JsonField%0A    public Asset movieUrl =
+       
  Ass
@@ -1520,53 +1520,21 @@
 ie%22)
-;%0A
+,
 %0A    
-@JsonField%0A    public Asset shareUrl =
+       
  Ass
@@ -1579,16 +1579,22 @@
 /share%22)
+%0A    )
 ;%0A%0A    @
@@ -1649,22 +1649,568 @@
    @Json
-Object
+Serializable%0A    @JsonObject%0A    public static class Speaker %7B%0A%0A        @JsonField%0A        public long id = 42;%0A%0A        @JsonField%0A        public String name = %22Foo Bar Baz%22;%0A    %7D%0A%0A    @JsonSerializable%0A    @JsonObject%0A    public static class Category %7B%0A%0A        @JsonField%0A        public long id = 43;%0A%0A        @JsonField%0A        public String name = %22JSON%22;%0A    %7D%0A%0A    @JsonSerializable%0A    @JsonObject%0A    public static class Room %7B%0A%0A        @JsonField%0A        public long id = 44;%0A%0A        @JsonField%0A        public String name = %22Room A%22;%0A    %7D%0A
 %0A    @Js
@@ -2220,24 +2220,40 @@
 erializable%0A
+    @JsonObject%0A
     public s
@@ -2269,24 +2269,43 @@
 ss Asset %7B%0A%0A
+        @JsonField%0A
         publ
@@ -2318,24 +2318,43 @@
 ing label;%0A%0A
+        @JsonField%0A
         publ

update benchmark