/** * Serialize sku details data to json * * @param skuDetails sku details data * @return json string * @throws JSONException */ private String skuDetailsToJson(SkuDetails skuDetails) throws JSONException { return new JSONStringer() .object() .key("itemType") .value(skuDetails.getItemType()) .key("sku") .value(skuDetails.getSku()) .key("type") .value(skuDetails.getType()) .key("price") .value(skuDetails.getPrice()) .key("title") .value(skuDetails.getTitle()) .key("description") .value(skuDetails.getDescription()) .key("json") .value(skuDetails.getJson()) .endObject() .toString(); }