calatonsystems / wc-api-java

Java wrapper for WooCommerce REST API
MIT License
98 stars 77 forks source link

Cannot pass object as perm to map. #27

Open rahman973 opened 4 years ago

rahman973 commented 4 years ago

while creating a product we make a map. which works fine for simple attributes, but is not working for object type attributes.

dimensions.setLength("1");
        dimensions.setWidth("1");
        dimensions.setHeight("1");
        Gson gson = new Gson();
        String json = gson.toJson(dimensions);

        productInfo.put("dimensions",json);

on printing, it shows JSON has the object of dimensions {"length":"1","width":"1","height":"1"}

help me fast plz

rahman973 commented 4 years ago

same is the case while working with images and categories.