package com.firefly.example.reactive.coffee.store.vo;

import com.firefly.$;

import java.util.List;

/**
 * @author Pengtao Qiu
 */
public class ProductBuyRequest {

    private Long userId;
    private List<InventoryUpdate> products;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public List<InventoryUpdate> getProducts() {
        return products;
    }

    public void setProducts(List<InventoryUpdate> products) {
        this.products = products;
    }



    public static void main(String[] args) {
        String json = "{\"userId\":0,\"products\":[{\"productId\":\"7\",\"amount\":\"4\"},{\"productId\":\"6\",\"amount\":\"1\"},{\"productId\":\"5\",\"amount\":\"1\"},{\"productId\":\"4\",\"amount\":\"1\"},{\"productId\":\"3\",\"amount\":\"1\"}]}";
        ProductBuyRequest request = $.json.parse(json, ProductBuyRequest.class);
        System.out.println(request.getProducts().size());
    }
}

@@ -52,31 +52,8 @@
 o;%0A%0A
-import com.firefly.$;%0A%0A
 impo
@@ -533,448 +533,6 @@
  %7D%0A%0A
-%0A%0A    public static void main(String%5B%5D args) %7B%0A        String json = %22%7B%5C%22userId%5C%22:0,%5C%22products%5C%22:%5B%7B%5C%22productId%5C%22:%5C%227%5C%22,%5C%22amount%5C%22:%5C%224%5C%22%7D,%7B%5C%22productId%5C%22:%5C%226%5C%22,%5C%22amount%5C%22:%5C%221%5C%22%7D,%7B%5C%22productId%5C%22:%5C%225%5C%22,%5C%22amount%5C%22:%5C%221%5C%22%7D,%7B%5C%22productId%5C%22:%5C%224%5C%22,%5C%22amount%5C%22:%5C%221%5C%22%7D,%7B%5C%22productId%5C%22:%5C%223%5C%22,%5C%22amount%5C%22:%5C%221%5C%22%7D%5D%7D%22;%0A        ProductBuyRequest request = $.json.parse(json, ProductBuyRequest.class);%0A        System.out.println(request.getProducts().size());%0A    %7D%0A
 %7D%0A

clean up code