private void ParseFromJson() { if (string.IsNullOrEmpty(Json)) { return; } var json = new JSON(Json); PriceValue = (json.ToFloat("price_amount_micros") / 1000000).ToString(); CurrencyCode = json.ToString("price_currency_code"); SubscriptionPeriod = json.ToString("subscriptionPeriod"); FreeTrialPeriod = json.ToString("freeTrialPeriod"); IntroductoryPriceValue = (json.ToFloat("introductoryPriceAmountMicros") / 1000000).ToString(); IntroductoryPrice = json.ToString("introductoryPrice"); IntroductoryPricePeriod = json.ToString("introductoryPricePeriod"); IntroductoryPriceCycles = json.ToString("introductoryPriceCycles"); Sku = json.ToString("productId"); }
private void ParseFromJson() { if (string.IsNullOrEmpty(Json)) { return; } var json = new JSON(Json); if (string.IsNullOrEmpty(PriceValue)) { float val = json.ToFloat("price_amount_micros"); val /= 1000000; PriceValue = val.ToString(); } if (string.IsNullOrEmpty(CurrencyCode)) { CurrencyCode = json.ToString("price_currency_code"); } }