Skip to content

Instantly share code, notes, and snippets.

@kewang
Created August 27, 2014 06:24
Show Gist options
  • Save kewang/2d49e4b3d55d478fe44b to your computer and use it in GitHub Desktop.
Save kewang/2d49e4b3d55d478fe44b to your computer and use it in GitHub Desktop.
complex-json
public class Layout {
private String layoutID;
private String title;
private ArrayList<Component> components;
public static class Component {
private String type;
private ComponentEntity entity;
public static abstract class ComponentEntity {
}
public static class TableView extends ComponentEntity {
private ArrayList<Component> cells;
}
public static class Coverflow extends ComponentEntity {
private ArrayList<Component> items;
}
public static class ImageView extends ComponentEntity {
private String source;
}
public static class Grid extends ComponentEntity {
private int columns;
private ArrayList<Component> items;
}
public static class ProductView extends ComponentEntity {
private String image;
private String name;
private int price;
private String size;
}
public static class UITableViewCellStyleValue1 extends ComponentEntity {
private String text;
private String subtext;
private String link;
}
public static class UITableViewCellStyleDefault extends ComponentEntity {
private String text;
private String link;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment