Needed some help accessing an element in a json string

stricknyn

New member
Joined
Mar 5, 2022
Messages
3
Programming Experience
10+
Hello everyone. Needed some help accessing an object from a json string. I have the following json:

json string:
{
  "revenue_centers": [],
  "product_mix_data": [
    {
      "row_type": "totals_row",
      "product_class": "Total"
    }
  ],
  "voids_data": [],
  "employees": [],
  "vouchers_available": false,
  "sales_data": {
    "house_account_payable": "0.00",
    "house_account_receivable": "0.00",
    "gift_sales_payable": "0.00",
    "gift_sales_receivable": "0.00",
    "store_credit_sales_payable": "0.00",
    "store_credit_sales_receivable": "0.00",
    "lia_deposits_payable": "0.00",
    "lia_deposits_receivable": "0.00",
    "applied_deposits_payable": "0.00",
    "pass_through_fee_total": "0.00",
    "donations": "0.00",
    "due_amount_payable": "0.00",
    "due_amount_receivable": "0.00",
    "house_account_receivable_tips": "0.00",
    "gift_sales_payable_tips": "0.00",
    "store_credit_sales_payable_tips": "0.00",
    "lia_deposits_payable_tips": "0.00",
    "lia_deposits_receivable_tips": "0.00",
    "taxable_sales": "0.00",
    "nontaxable_sales": "0.00",
    "total_sales": "0.00",
    "gross_sales": "0.00",
    "net_sales": "0.00",
    "gift_sales": "0.00",
    "gift_payments": "0.00",
    "gift_liabilities": "0.00",
    "store_credit_sales": "0.00",
    "store_credit_payments": "0.00",
    "store_credit_liabilities": "0.00",
    "deposit_total": "0.00",
    "deposit_payments": "0.00",
    "deposit_liabilities": "0.00",
    "safe_drops_count": "0.00",
    "safe_counts_count": "0.00",
    "bank_deposits_count": "0.00",
    "total_declared_safe_drops": "0.00",
    "total_actual_safe_drops": "0.00",
    "total_safe_counts": "0.00",
    "total_bank_deposits": "0.00",
    "safe_drop_variance": "0.00",
    "amount_to_deposit": "0.00",
    "amount_in_safe": "0.00",
    "number_of_no_sales": "0",
    "payments_for_ha": "0.00",
    "applied_ha": "0.00",
    "house_account_liabilities": "0.00",
    "liabilities": "0.00",
    "liabilities_total": "0.00",
    "total_payments": "0.00",
    "net_account_for": "0.00",
    "deposit_tips": "0.00",
    "net_sales_taxed": "0.00",
    "net_sales_untaxed": "0.00",
    "pass_through_fee_taxable": "0.00",
    "cash_total": "0.00",
    "cash_for_deposits": "0.00",
    "cash_for_sales": "0.00",
    "cash_qty": 0,
    "cash_refunds": "0.00",
    "cash_gratuity": "0.00",
    "cash_totals_with_refunds": "0.00",
    "cash_house_account": "0.00",
    "credit_for_deposits": "0.00",
    "credit_refunds": "0.00",
    "credit_gratuity": "0.00",
    "credit_house_account": "0.00",
    "credit_qty": 0,
    "credit_total": "0.00",
    "credit_totals_with_refunds": "0.00",
    "credit_for_sales": "0.00",
    "debit_total": "0.00",
    "debit_for_sales": "0.00",
    "debit_for_deposits": "0.00",
    "debit_refunds": "0.00",
    "debit_house_account": "0.00",
    "debit_gratuity": "0.00",
    "debit_totals_with_refunds": "0.00",
    "debit_qty": 0,
    "check_totals_with_refunds": "0.00",
    "check_refunds": "0.00",
    "check_house_account": "0.00",
    "check_total": "0.00",
    "check_qty": 0,
    "check_for_sales": "0.00",
    "check_for_deposits": "0.00",
    "check_gratuity": "0.00",
    "trade_house_account": "0.00",
    "trade_gratuity": "0.00",
    "trade_qty": 0,
    "trade_total": "0.00",
    "trade_for_sales": "0.00",
    "trade_totals_with_refunds": "0.00",
    "trade_for_deposits": "0.00",
    "trade_refunds": "0.00",
    "levelup_totals_with_refunds": "0.00",
    "levelup_for_deposits": "0.00",
    "levelup_house_account": "0.00",
    "levelup_refunds": "0.00",
    "levelup_qty": 0,
    "levelup_for_sales": "0.00",
    "levelup_gratuity": "0.00",
    "index_for_deposits": "0.00",
    "index_gratuity": "0.00",
    "index_qty": 0,
    "index_refunds": "0.00",
    "index_house_account": "0.00",
    "index_totals_with_refunds": "0.00",
    "index_for_sales": "0.00",
    "paypal_for_sales": "0.00",
    "paypal_totals_with_refunds": "0.00",
    "paypal_gratuity": "0.00",
    "paypal_for_deposits": "0.00",
    "paypal_refunds": "0.00",
    "paypal_house_account": "0.00",
    "paypal_qty": 0,
    "ebt_foodstamp_for_deposits": "0.00",
    "ebt_foodstamp_totals_with_refunds": "0.00",
    "ebt_foodstamp_total": "0.00",
    "ebt_foodstamp_gratuity": "0.00",
    "ebt_foodstamp_house_account": "0.00",
    "ebt_foodstamp_for_sales": "0.00",
    "ebt_foodstamp_refunds": "0.00",
    "ebt_foodstamp_qty": 0,
    "bitcoin_totals_with_refunds": "0.00",
    "bitcoin_for_sales": "0.00",
    "bitcoin_qty": 0,
    "bitcoin_house_account": "0.00",
    "bitcoin_for_deposits": "0.00",
    "bitcoin_gratuity": "0.00",
    "bitcoin_total": "0.00",
    "bitcoin_refunds": "0.00",
    "ebt_cash_totals_with_refunds": "0.00",
    "ebt_cash_house_account": "0.00",
    "ebt_cash_qty": 0,
    "ebt_cash_for_deposits": "0.00",
    "ebt_cash_for_sales": "0.00",
    "ebt_cash_gratuity": "0.00",
    "ebt_cash_total": "0.00",
    "ebt_cash_refunds": "0.00",
    "zapper_totals_with_refunds": "0.00",
    "zapper_refunds": "0.00",
    "zapper_house_account": "0.00",
    "zapper_for_deposits": "0.00",
    "zapper_for_sales": "0.00",
    "zapper_qty": 0,
    "zapper_gratuity": "0.00",
    "ssmc_house_account": "0.00",
    "ssmc_totals_with_refunds": "0.00",
    "ssmc_gratuity": "0.00",
    "ssmc_qty": 0,
    "ssmc_for_sales": "0.00",
    "ssmc_refunds": "0.00",
    "ssmc_for_deposits": "0.00",
    "sale_loss_drive_off_total": "0.00",
    "sale_loss_drive_off_qty": 0,
    "sale_loss_drive_off_for_deposits": "0.00",
    "sale_loss_drive_off_for_sales": "0.00",
    "sale_loss_drive_off_refunds": "0.00",
    "sale_loss_drive_off_house_account": "0.00",
    "sale_loss_drive_off_totals_with_refunds": "0.00",
    "sale_loss_drive_off_gratuity": "0.00",
    "fleet_totals_with_refunds": "0.00",
    "fleet_for_sales": "0.00",
    "fleet_for_deposits": "0.00",
    "fleet_gratuity": "0.00",
    "fleet_qty": 0,
    "fleet_refunds": "0.00",
    "fleet_house_account": "0.00",
    "other_for_sales": "0.00",
    "other_qty": 0,
    "other_refunds": "0.00",
    "other_house_account": "0.00",
    "other_totals_with_refunds": "0.00",
    "other_gratuity": "0.00",
    "other_for_deposits": "0.00",
    "other_total": "0.00",
    "como_for_sales": "0.00",
    "como_refunds": "0.00",
    "como_totals_with_refunds": "0.00",
    "como_house_account": "0.00",
    "como_gratuity": "0.00",
    "como_for_deposits": "0.00",
    "como_qty": 0,
    "plant_house_account": "0.00",
    "plant_for_sales": "0.00",
    "plant_refunds": "0.00",
    "plant_qty": 0,
    "plant_gratuity": "0.00",
    "plant_for_deposits": "0.00",
    "plant_totals_with_refunds": "0.00",
    "voucher_for_deposits": "0.00",
    "voucher_totals_with_refunds": "0.00",
    "voucher_gratuity": "0.00",
    "voucher_refunds": "0.00",
    "voucher_for_sales": "0.00",
    "voucher_qty": 0,
    "voucher_house_account": "0.00",
    "rabbit_qty": 0,
    "rabbit_totals_with_refunds": "0.00",
    "rabbit_for_deposits": "0.00",
    "rabbit_gratuity": "0.00",
    "rabbit_refunds": "0.00",
    "rabbit_for_sales": "0.00",
    "rabbit_house_account": "0.00",
    "linepay_for_sales": "0.00",
    "linepay_house_account": "0.00",
    "linepay_totals_with_refunds": "0.00",
    "linepay_for_deposits": "0.00",
    "linepay_qty": 0,
    "linepay_refunds": "0.00",
    "linepay_gratuity": "0.00",
    "wechat_alipay_totals_with_refunds": "0.00",
    "wechat_alipay_for_deposits": "0.00",
    "wechat_alipay_for_sales": "0.00",
    "wechat_alipay_refunds": "0.00",
    "wechat_alipay_qty": 0,
    "wechat_alipay_gratuity": "0.00",
    "wechat_alipay_house_account": "0.00",
    "lcms_voucher_gratuity": "0.00",
    "lcms_voucher_for_deposits": "0.00",
    "lcms_voucher_refunds": "0.00",
    "lcms_voucher_qty": 0,
    "lcms_voucher_house_account": "0.00",
    "lcms_voucher_totals_with_refunds": "0.00",
    "lcms_voucher_for_sales": "0.00",
    "nets_card_refunds": "0.00",
    "nets_card_for_deposits": "0.00",
    "nets_card_house_account": "0.00",
    "nets_card_qty": "0",
    "nets_card_for_sales": "0.00",
    "nets_card_gratuity": "0.00",
    "nets_card_totals_with_refunds": "0.00",
    "levelup_gift_for_sales": "0.00",
    "levelup_gift_refunds": "0.00",
    "levelup_gift_qty": 0,
    "levelup_gift_house_account": "0.00",
    "levelup_gift_totals_with_refunds": "0.00",
    "levelup_gift_for_deposits": "0.00",
    "levelup_gift_gratuity": "0.00",
    "custom_payment_total": "0.00",
    "custom_payment_for_deposits": "0.00",
    "custom_payment_gratuity": "0.00",
    "custom_payment_refunds": "0.00",
    "custom_payment_qty": 0,
    "custom_payment_for_sales": "0.00",
    "custom_payment_house_account": "0.00",
    "custom_payment_totals_with_refunds": "0.00",
    "deposit_raw": "0.00",
    "payments_refund_total": "0.00",
    "payments_total_for_sales": "0.00",
    "payments_total_qty": "0",
    "cash_summary_cash_total": "0.00",
    "house_account_house_account": "-",
    "american_express_qty": "0",
    "american_express_refunds": "0.00",
    "american_express_for_sales": "0.00",
    "american_express_for_deposits": "0.00",
    "american_express_house_account": "0.00",
    "american_express_totals_with_refunds": "0.00",
    "discover_qty": "0",
    "discover_refunds": "0.00",
    "discover_for_sales": "0.00",
    "discover_for_deposits": "0.00",
    "discover_house_account": "0.00",
    "discover_totals_with_refunds": "0.00",
    "mastercard_qty": "0",
    "mastercard_refunds": "0.00",
    "mastercard_for_sales": "0.00",
    "mastercard_for_deposits": "0.00",
    "mastercard_house_account": "0.00",
    "mastercard_totals_with_refunds": "0.00",
    "visa_qty": "0",
    "visa_refunds": "0.00",
    "visa_for_sales": "0.00",
    "visa_for_deposits": "0.00",
    "visa_house_account": "0.00",
    "visa_totals_with_refunds": "0.00",
    "maestro_qty": "0",
    "maestro_refunds": "0.00",
    "maestro_for_sales": "0.00",
    "maestro_for_deposits": "0.00",
    "maestro_house_account": "0.00",
    "maestro_totals_with_refunds": "0.00",
    "eftpos_qty": "0",
    "eftpos_refunds": "0.00",
    "eftpos_for_sales": "0.00",
    "eftpos_for_deposits": "0.00",
    "eftpos_house_account": "0.00",
    "eftpos_totals_with_refunds": "0.00",
    "other_credit_card_qty": "0",
    "other_credit_card_refunds": "0.00",
    "other_credit_card_for_sales": "0.00",
    "other_credit_card_for_deposits": "0.00",
    "other_credit_card_house_account": "0.00",
    "other_credit_card_totals_with_refunds": "0.00",
    "cash_drops": "0.00",
    "actual_cash": "0.00",
    "cash_safe_drops": "0.00",
    "cash_drops_count": 0,
    "expected_cash": "0.00",
    "expected_cash_from_tills": "0.00",
    "cash_other": "0.00",
    "starting_cash": "0.00",
    "declared_cash": "0.00",
    "cash_variance": "0.00",
    "pure_discount_totals": "0.00",
    "rounding_deltas": "0.00",
    "service_fee_total": "0.00",
    "taxable_service_fee": "0.00",
    "nontaxable_service_fee": "0.00",
    "ship_and_handling": "0.00",
    "item_discounts": "0.00",
    "order_discounts_total": "0.00",
    "total_discounts": "0.00",
    "sales_tax": "0.00",
    "pass_through_fee_tax": "0.00",
    "surcharges_total": "0.00",
    "total_tax_surcharge_service": "0.00",
    "crv_value_as_price_part": "0.00",
    "crv_value_as_tax": "0.00",
    "visa_total": "0.00",
    "mastercard_total": "0.00",
    "american_express_total": "0.00",
    "discover_total": "0.00",
    "other_credit_card_total": "0.00",
    "applied_deposit_total": "0.00",
    "applied_deposit_for_sales": "0.00",
    "applied_deposit_for_deposits": "0.00",
    "applied_deposit_refunds": "0.00",
    "applied_deposit_tips_total": "0.00",
    "applied_deposit_totals_with_refunds": "0.00",
    "applied_deposit_qty": 0,
    "applied_deposit_other_credit_card": "0.00",
    "applied_deposit_other_credit_card_tips": "0.00",
    "applied_deposit_american_express": "0.00",
    "applied_deposit_american_express_tips": "0.00",
    "applied_deposit_discover": "0.00",
    "applied_deposit_discover_tips": "0.00",
    "applied_deposit_mastercard": "0.00",
    "applied_deposit_mastercard_tips": "0.00",
    "applied_deposit_visa": "0.00",
    "applied_deposit_visa_tips": "0.00",
    "expected_total_cash_to_business": "0.00",
    "actual_total_cash_to_business": "0.00",
    "cash_tips_total": "0.00",
    "credit_tips_total": "0.00",
    "visa_tips": "0.00",
    "mastercard_tips": "0.00",
    "american_express_tips": "0.00",
    "amex_tips": "0.00",
    "discover_tips": "0.00",
    "other_credit_card_tips": "0.00",
    "paypal_tips_total": "0.00",
    "custom_payment_tips_total": "0.00",
    "tips_total": "0.00",
    "payable_tips": "0.00",
    "liabilities_tips_total": "0.00",
    "payments_accepted_amount": "0.00",
    "payments_captured_amount": "0.00",
    "payments_declined_amount": "0.00",
    "payments_failed_amount": "0.00",
    "payments_pending_amount": "0.00",
    "payments_unknown_amount": "0.00",
    "other_tips_total": "0.00",
    "refunds_total": "0.00",
    "refunds_count": "0",
    "payouts_total": "0.00",
    "payouts_count": "0",
    "payouts_ins_total": "0.00",
    "payouts_ins_count": "0",
    "payins_cashdrops_total": "0.00",
    "payins_cashdrops_count": "0",
    "payouts_outs_total": "0.00",
    "payouts_outs_count": "0",
    "payouts_cashdrops_total": "0.00",
    "payouts_cashdrops_count": "0",
    "declared_tips": "0.00",
    "safe_drops": "0.00",
    "voided_total": "0.00",
    "voided_items": 0,
    "returned_total": "0.00",
    "returned_items": 0,
    "comps_total": "0.00",
    "comps_items": 0,
    "exchanged_total": "0.00",
    "exchanged_items": 0,
    "total_number_of_people": 0,
    "avg_sale_per_person": "0.00",
    "adj_credit_tips_total": "0.00",
    "adj_credit_tips": "0.00",
    "adj_visa_tips": "0.00",
    "adj_visa_tips_total": "0.00",
    "adj_mastercard_tips": "0.00",
    "adj_mastercard_tips_total": "0.00",
    "adj_american_express_tips": "0.00",
    "adj_amex_tips": "0.00",
    "adj_american_express_tips_total": "0.00",
    "adj_amex_tips_total": "0.00",
    "adj_other_credit_card_tips_total": "0.00",
    "adj_other_credit_card_tips": "0.00",
    "adj_paypal_tips": "0.00",
    "adj_paypal_tips_total": "0.00",
    "adj_discover_tips": "0.00",
    "adj_discover_tips_total": "0.00",
    "adj_non_cash_tips_total_minus_cash": "0.00",
    "adj_tips_total": "0.00",
    "adj_payable_tips_total": "0.00",
    "adj_declined_tips_total": "0.00",
    "adj_total": "0.00",
    "total_invoices": 0,
    "total_orders": 0,
    "avg_sale": "-",
    "non_cash_tips_total_minus_cash": "0.00",
    "non_cash_tips": "0.00",
    "adj_non_cash_tips": "0.00",
    "Payins/Payouts": "0.00",
    "tip_in": "0.00",
    "cash_due_payments": "0.00",
    "cash_payments": "0.00",
    "custom_payments": {
      "payment_202": {
        "name": "UberEats",
        "refunds": "0.00",
        "gratuity": "0.00",
        "qty": "0",
        "for_sales": "0.00",
        "amount": "0.00",
        "totals_with_refunds": "0.00",
        "for_deposits": "0.00",
        "tips": "0.00",
        "total": "0.00",
        "house_account": "0.00"
      },
      "payment_203": {
        "name": "GrubHub",
        "refunds": "0.00",
        "gratuity": "0.00",
        "qty": "0",
        "for_sales": "0.00",
        "amount": "0.00",
        "totals_with_refunds": "0.00",
        "for_deposits": "0.00",
        "tips": "0.00",
        "total": "0.00",
        "house_account": "0.00"
      },
      "payment_200": {
        "name": "Olo",
        "refunds": "0.00",
        "gratuity": "0.00",
        "qty": "0",
        "for_sales": "0.00",
        "amount": "0.00",
        "totals_with_refunds": "0.00",
        "for_deposits": "0.00",
        "tips": "0.00",
        "total": "0.00",
        "house_account": "0.00"
      },
      "payment_201": {
        "name": "DoorDash",
        "refunds": "0.00",
        "gratuity": "0.00",
        "qty": "0",
        "for_sales": "0.00",
        "amount": "0.00",
        "totals_with_refunds": "0.00",
        "for_deposits": "0.00",
        "tips": "0.00",
        "total": "0.00",
        "house_account": "0.00"
      },
      "payment_206": {
        "name": "EZ Cater",
        "refunds": "0.00",
        "gratuity": "0.00",
        "qty": "0",
        "for_sales": "0.00",
        "amount": "0.00",
        "totals_with_refunds": "0.00",
        "for_deposits": "0.00",
        "tips": "0.00",
        "total": "0.00",
        "house_account": "0.00"
      },
      "payment_207": {
        "name": "Local 3rd Party",
        "refunds": "0.00",
        "gratuity": "0.00",
        "qty": "0",
        "for_sales": "0.00",
        "amount": "0.00",
        "totals_with_refunds": "0.00",
        "for_deposits": "0.00",
        "tips": "0.00",
        "total": "0.00",
        "house_account": "0.00"
      },
      "payment_204": {
        "name": "Waitr",
        "refunds": "0.00",
        "gratuity": "0.00",
        "qty": "0",
        "for_sales": "0.00",
        "amount": "0.00",
        "totals_with_refunds": "0.00",
        "for_deposits": "0.00",
        "tips": "0.00",
        "total": "0.00",
        "house_account": "0.00"
      },
      "payment_205": {
        "name": "Google",
        "refunds": "0.00",
        "gratuity": "0.00",
        "qty": "0",
        "for_sales": "0.00",
        "amount": "0.00",
        "totals_with_refunds": "0.00",
        "for_deposits": "0.00",
        "tips": "0.00",
        "total": "0.00",
        "house_account": "0.00"
      }
    },
    "vouchers": {},
    "counted_discounts": {},
    "show_donations": false
  },
  "posstations": [
    [
      82,
      "POS1"
    ]
  ],
  "labor_data": [],
  "discounts_data": [],
  "tax_data": [
    {
      "taxable_sales": 0,
      "tax": 0,
      "name": "Other Surcharge"
    },
    {
      "taxable_sales": 0,
      "tax": 0,
      "name": "Pass Through Fee Taxes"
    },
    {
      "tax": 0,
      "name": "Total",
      "row_type": "totals_row"
    }
  ]
}

I'm only after the "sales_data" portion. I have it represented in a class:

C#:
public class Sales_data
{
    
    public string HouseAccountPayable { get; set; }
    public string HouseAccountReceivable { get; set; }
    public string GiftSalesPayable { get; set; }
    public string GiftSalesReceivable { get; set; }
    public string StoreCreditSalesPayable { get; set; }
    public string StoreCreditSalesReceivable { get; set; }
    public string LiaDepositsPayable { get; set; }
    public string LiaDepositsReceivable { get; set; }
    public string AppliedDepositsPayable { get; set; }
    public string PassThroughFeeTotal { get; set; }
    public string Donations { get; set; }
    public string DueAmountPayable { get; set; }
    public string DueAmountReceivable { get; set; }
    public string HouseAccountReceivableTips { get; set; }
    public string GiftSalesPayableTips { get; set; }
    public string StoreCreditSalesPayableTips { get; set; }
    public string LiaDepositsPayableTips { get; set; }
    public string LiaDepositsReceivableTips { get; set; }
    public string TaxableSales { get; set; }
    public string NontaxableSales { get; set; }
    public string TotalSales { get; set; }
    public string GrossSales { get; set; }
    public string NetSales { get; set; }
    public string GiftSales { get; set; }
    public string GiftPayments { get; set; }
    public string GiftLiabilities { get; set; }
    public string StoreCreditSales { get; set; }
    public string StoreCreditPayments { get; set; }
    public string StoreCreditLiabilities { get; set; }
    public string DepositTotal { get; set; }
    public string DepositPayments { get; set; }
    public string DepositLiabilities { get; set; }
    public string SafeDropsCount { get; set; }
    public string SafeCountsCount { get; set; }
    public string BankDepositsCount { get; set; }
    public string TotalDeclaredSafeDrops { get; set; }
    public string TotalActualSafeDrops { get; set; }
    public string TotalSafeCounts { get; set; }
    public string TotalBankDeposits { get; set; }
    public string SafeDropVariance { get; set; }
    public string AmountToDeposit { get; set; }
    public string AmountInSafe { get; set; }
    public string NumberOfNoSales { get; set; }
    public string PaymentsForHa { get; set; }
    public string AppliedHa { get; set; }
    public string HouseAccountLiabilities { get; set; }
    public string Liabilities { get; set; }
    public string LiabilitiesTotal { get; set; }
    public string TotalPayments { get; set; }
    public string NetAccountFor { get; set; }
    public string DepositTips { get; set; }
    public string NetSalesTaxed { get; set; }
    public string NetSalesUntaxed { get; set; }
    public string PassThroughFeeTaxable { get; set; }
    public string CashTotal { get; set; }
    public string CashForDeposits { get; set; }
    public string CashForSales { get; set; }
    public int CashQty { get; set; }
    public string CashRefunds { get; set; }
    public string CashGratuity { get; set; }
    public string CashTotalsWithRefunds { get; set; }
    public string CashHouseAccount { get; set; }
    public string CreditForDeposits { get; set; }
    public string CreditRefunds { get; set; }
    public string CreditGratuity { get; set; }
    public string CreditHouseAccount { get; set; }
    public int CreditQty { get; set; }
    public string CreditTotal { get; set; }
    public string CreditTotalsWithRefunds { get; set; }
    public string CreditForSales { get; set; }
    public string DebitTotal { get; set; }
    public string DebitForSales { get; set; }
    public string DebitForDeposits { get; set; }
    public string DebitRefunds { get; set; }
    public string DebitHouseAccount { get; set; }
    public string DebitGratuity { get; set; }
    public string DebitTotalsWithRefunds { get; set; }
    public int DebitQty { get; set; }
    public string CheckTotalsWithRefunds { get; set; }
    public string CheckRefunds { get; set; }
    public string CheckHouseAccount { get; set; }
    public string CheckTotal { get; set; }
    public int CheckQty { get; set; }
    public string CheckForSales { get; set; }
    public string CheckForDeposits { get; set; }
    public string CheckGratuity { get; set; }
    public string TradeHouseAccount { get; set; }
    public string TradeGratuity { get; set; }
    public int TradeQty { get; set; }
    public string TradeTotal { get; set; }
    public string TradeForSales { get; set; }
    public string TradeTotalsWithRefunds { get; set; }
    public string TradeForDeposits { get; set; }
    public string TradeRefunds { get; set; }
    public string LevelupTotalsWithRefunds { get; set; }
    public string LevelupForDeposits { get; set; }
    public string LevelupHouseAccount { get; set; }
    public string LevelupRefunds { get; set; }
    public double LevelupQty { get; set; }
    public string LevelupForSales { get; set; }
    public string LevelupGratuity { get; set; }
    public string IndexForDeposits { get; set; }
    public string IndexGratuity { get; set; }
    public int IndexQty { get; set; }
    public string IndexRefunds { get; set; }
    public string IndexHouseAccount { get; set; }
    public string IndexTotalsWithRefunds { get; set; }
    public string IndexForSales { get; set; }
    public string PaypalForSales { get; set; }
    public string PaypalTotalsWithRefunds { get; set; }
    public string PaypalGratuity { get; set; }
    public string PaypalForDeposits { get; set; }
    public string PaypalRefunds { get; set; }
    public string PaypalHouseAccount { get; set; }
    public int PaypalQty { get; set; }
    public string EbtFoodstampForDeposits { get; set; }
    public string EbtFoodstampTotalsWithRefunds { get; set; }
    public string EbtFoodstampTotal { get; set; }
    public string EbtFoodstampGratuity { get; set; }
    public string EbtFoodstampHouseAccount { get; set; }
    public string EbtFoodstampForSales { get; set; }
    public string EbtFoodstampRefunds { get; set; }
    public int EbtFoodstampQty { get; set; }
    public string BitcoinTotalsWithRefunds { get; set; }
    public string BitcoinForSales { get; set; }
    public int BitcoinQty { get; set; }
    public string BitcoinHouseAccount { get; set; }
    public string BitcoinForDeposits { get; set; }
    public string BitcoinGratuity { get; set; }
    public string BitcoinTotal { get; set; }
    public string BitcoinRefunds { get; set; }
    public string EbtCashTotalsWithRefunds { get; set; }
    public string EbtCashHouseAccount { get; set; }
    public int EbtCashQty { get; set; }
    public string EbtCashForDeposits { get; set; }
    public string EbtCashForSales { get; set; }
    public string EbtCashGratuity { get; set; }
    public string EbtCashTotal { get; set; }
    public string EbtCashRefunds { get; set; }
    public string ZapperTotalsWithRefunds { get; set; }
    public string ZapperRefunds { get; set; }
    public string ZapperHouseAccount { get; set; }
    public string ZapperForDeposits { get; set; }
    public string ZapperForSales { get; set; }
    public double ZapperQty { get; set; }
    public string ZapperGratuity { get; set; }
    public string SsmcHouseAccount { get; set; }
    public string SsmcTotalsWithRefunds { get; set; }
    public string SsmcGratuity { get; set; }
    public int SsmcQty { get; set; }
    public string SsmcForSales { get; set; }
    public string SsmcRefunds { get; set; }
    public string SsmcForDeposits { get; set; }
    public string SaleLossDriveOffTotal { get; set; }
    public int SaleLossDriveOffQty { get; set; }
    public string SaleLossDriveOffForDeposits { get; set; }
    public string SaleLossDriveOffForSales { get; set; }
    public string SaleLossDriveOffRefunds { get; set; }
    public string SaleLossDriveOffHouseAccount { get; set; }
    public string SaleLossDriveOffTotalsWithRefunds { get; set; }
    public string SaleLossDriveOffGratuity { get; set; }
    public string FleetTotalsWithRefunds { get; set; }
    public string FleetForSales { get; set; }
    public string FleetForDeposits { get; set; }
    public string FleetGratuity { get; set; }
    public int FleetQty { get; set; }
    public string FleetRefunds { get; set; }
    public string FleetHouseAccount { get; set; }
    public string OtherForSales { get; set; }
    public int OtherQty { get; set; }
    public string OtherRefunds { get; set; }
    public string OtherHouseAccount { get; set; }
    public string OtherTotalsWithRefunds { get; set; }
    public string OtherGratuity { get; set; }
    public string OtherForDeposits { get; set; }
    public string OtherTotal { get; set; }
    public string ComoForSales { get; set; }
    public string ComoRefunds { get; set; }
    public string ComoTotalsWithRefunds { get; set; }
    public string ComoHouseAccount { get; set; }
    public string ComoGratuity { get; set; }
    public string ComoForDeposits { get; set; }
    public int ComoQty { get; set; }
    public string PlantHouseAccount { get; set; }
    public string PlantForSales { get; set; }
    public string PlantRefunds { get; set; }
    public int PlantQty { get; set; }
    public string PlantGratuity { get; set; }
    public string PlantForDeposits { get; set; }
    public string PlantTotalsWithRefunds { get; set; }
    public string VoucherForDeposits { get; set; }
    public string VoucherTotalsWithRefunds { get; set; }
    public string VoucherGratuity { get; set; }
    public string VoucherRefunds { get; set; }
    public string VoucherForSales { get; set; }
    public int VoucherQty { get; set; }
    public string VoucherHouseAccount { get; set; }
    public int RabbitQty { get; set; }
    public string RabbitTotalsWithRefunds { get; set; }
    public string RabbitForDeposits { get; set; }
    public string RabbitGratuity { get; set; }
    public string RabbitRefunds { get; set; }
    public string RabbitForSales { get; set; }
    public string RabbitHouseAccount { get; set; }
    public string LinepayForSales { get; set; }
    public string LinepayHouseAccount { get; set; }
    public string LinepayTotalsWithRefunds { get; set; }
    public string LinepayForDeposits { get; set; }
    public int LinepayQty { get; set; }
    public string LinepayRefunds { get; set; }
    public string LinepayGratuity { get; set; }
    public string WechatAlipayTotalsWithRefunds { get; set; }
    public string WechatAlipayForDeposits { get; set; }
    public string WechatAlipayForSales { get; set; }
    public string WechatAlipayRefunds { get; set; }
    public int WechatAlipayQty { get; set; }
    public string WechatAlipayGratuity { get; set; }
    public string WechatAlipayHouseAccount { get; set; }
    public string LcmsVoucherGratuity { get; set; }
    public string LcmsVoucherForDeposits { get; set; }
    public string LcmsVoucherRefunds { get; set; }
    public int LcmsVoucherQty { get; set; }
    public string LcmsVoucherHouseAccount { get; set; }
    public string LcmsVoucherTotalsWithRefunds { get; set; }
    public string LcmsVoucherForSales { get; set; }
    public string NetsCardRefunds { get; set; }
    public string NetsCardForDeposits { get; set; }
    public string NetsCardHouseAccount { get; set; }
    public string NetsCardQty { get; set; }
    public string NetsCardForSales { get; set; }
    public string NetsCardGratuity { get; set; }
    public string NetsCardTotalsWithRefunds { get; set; }
    public string LevelupGiftForSales { get; set; }
    public string LevelupGiftRefunds { get; set; }
    public double LevelupGiftQty { get; set; }
    public string LevelupGiftHouseAccount { get; set; }
    public string LevelupGiftTotalsWithRefunds { get; set; }
    public string LevelupGiftForDeposits { get; set; }
    public string LevelupGiftGratuity { get; set; }
    public string CustomPaymentTotal { get; set; }
    public string CustomPaymentForDeposits { get; set; }
    public string CustomPaymentGratuity { get; set; }
    public string CustomPaymentRefunds { get; set; }
    public int CustomPaymentQty { get; set; }
    public string CustomPaymentForSales { get; set; }
    public string CustomPaymentHouseAccount { get; set; }
    public string CustomPaymentTotalsWithRefunds { get; set; }
    public string DepositRaw { get; set; }
    public string PaymentsRefundTotal { get; set; }
    public string PaymentsTotalForSales { get; set; }
    public string PaymentsTotalQty { get; set; }
    public string CashSummaryCashTotal { get; set; }
    public string HouseAccountHouseAccount { get; set; }
    public string AmericanExpressQty { get; set; }
    public string AmericanExpressRefunds { get; set; }
    public string AmericanExpressForSales { get; set; }
    public string AmericanExpressForDeposits { get; set; }
    public string AmericanExpressHouseAccount { get; set; }
    public string AmericanExpressTotalsWithRefunds { get; set; }
    public string DiscoverQty { get; set; }
    public string DiscoverRefunds { get; set; }
    public string DiscoverForSales { get; set; }
    public string DiscoverForDeposits { get; set; }
    public string DiscoverHouseAccount { get; set; }
    public string DiscoverTotalsWithRefunds { get; set; }
    public string MastercardQty { get; set; }
    public string MastercardRefunds { get; set; }
    public string MastercardForSales { get; set; }
    public string MastercardForDeposits { get; set; }
    public string MastercardHouseAccount { get; set; }
    public string MastercardTotalsWithRefunds { get; set; }
    public string VisaQty { get; set; }
    public string VisaRefunds { get; set; }
    public string VisaForSales { get; set; }
    public string VisaForDeposits { get; set; }
    public string VisaHouseAccount { get; set; }
    public string VisaTotalsWithRefunds { get; set; }
    public string MaestroQty { get; set; }
    public string MaestroRefunds { get; set; }
    public string MaestroForSales { get; set; }
    public string MaestroForDeposits { get; set; }
    public string MaestroHouseAccount { get; set; }
    public string MaestroTotalsWithRefunds { get; set; }
    public string EftposQty { get; set; }
    public string EftposRefunds { get; set; }
    public string EftposForSales { get; set; }
    public string EftposForDeposits { get; set; }
    public string EftposHouseAccount { get; set; }
    public string EftposTotalsWithRefunds { get; set; }
    public string OtherCreditCardQty { get; set; }
    public string OtherCreditCardRefunds { get; set; }
    public string OtherCreditCardForSales { get; set; }
    public string OtherCreditCardForDeposits { get; set; }
    public string OtherCreditCardHouseAccount { get; set; }
    public string OtherCreditCardTotalsWithRefunds { get; set; }
    public string CashDrops { get; set; }
    public string ActualCash { get; set; }
    public string CashSafeDrops { get; set; }
    public double CashDropsCount { get; set; }
    public string ExpectedCash { get; set; }
    public string ExpectedCashFromTills { get; set; }
    public string CashOther { get; set; }
    public string StartingCash { get; set; }
    public string DeclaredCash { get; set; }
    public string CashVariance { get; set; }
    public string PureDiscountTotals { get; set; }
    public string RoundingDeltas { get; set; }
    public string ServiceFeeTotal { get; set; }
    public string TaxableServiceFee { get; set; }
    public string NontaxableServiceFee { get; set; }
    public string ShipAndHandling { get; set; }
    public string ItemDiscounts { get; set; }
    public string OrderDiscountsTotal { get; set; }
    public string TotalDiscounts { get; set; }
    public string SalesTax { get; set; }
    public string PassThroughFeeTax { get; set; }
    public string SurchargesTotal { get; set; }
    public string TotalTaxSurchargeService { get; set; }
    public string CrvValueAsPricePart { get; set; }
    public string CrvValueAsTax { get; set; }
    public string VisaTotal { get; set; }
    public string MastercardTotal { get; set; }
    public string AmericanExpressTotal { get; set; }
    public string DiscoverTotal { get; set; }
    public string OtherCreditCardTotal { get; set; }
    public string AppliedDepositTotal { get; set; }
    public string AppliedDepositForSales { get; set; }
    public string AppliedDepositForDeposits { get; set; }
    public string AppliedDepositRefunds { get; set; }
    public string AppliedDepositTipsTotal { get; set; }
    public string AppliedDepositTotalsWithRefunds { get; set; }
    public int AppliedDepositQty { get; set; }
    public string AppliedDepositOtherCreditCard { get; set; }
    public string AppliedDepositOtherCreditCardTips { get; set; }
    public string AppliedDepositAmericanExpress { get; set; }
    public string AppliedDepositAmericanExpressTips { get; set; }
    public string AppliedDepositDiscover { get; set; }
    public string AppliedDepositDiscoverTips { get; set; }
    public string AppliedDepositMastercard { get; set; }
    public string AppliedDepositMastercardTips { get; set; }
    public string AppliedDepositVisa { get; set; }
    public string AppliedDepositVisaTips { get; set; }
    public string ExpectedTotalCashToBusiness { get; set; }
    public string ActualTotalCashToBusiness { get; set; }
    public string CashTipsTotal { get; set; }
    public string CreditTipsTotal { get; set; }
    public string VisaTips { get; set; }
    public string MastercardTips { get; set; }
    public string AmericanExpressTips { get; set; }
    public string AmexTips { get; set; }
    public string DiscoverTips { get; set; }
    public string OtherCreditCardTips { get; set; }
    public string PaypalTipsTotal { get; set; }
    public string CustomPaymentTipsTotal { get; set; }
    public string TipsTotal { get; set; }
    public string PayableTips { get; set; }
    public string LiabilitiesTipsTotal { get; set; }
    public string PaymentsAcceptedAmount { get; set; }
    public string PaymentsCapturedAmount { get; set; }
    public string PaymentsDeclinedAmount { get; set; }
    public string PaymentsFailedAmount { get; set; }
    public string PaymentsPendingAmount { get; set; }
    public string PaymentsUnknownAmount { get; set; }
    public string OtherTipsTotal { get; set; }
    public string RefundsTotal { get; set; }
    public string RefundsCount { get; set; }
    public string PayoutsTotal { get; set; }
    public string PayoutsCount { get; set; }
    public string PayoutsInsTotal { get; set; }
    public string PayoutsInsCount { get; set; }
    public string PayinsCashdropsTotal { get; set; }
    public string PayinsCashdropsCount { get; set; }
    public string PayoutsOutsTotal { get; set; }
    public string PayoutsOutsCount { get; set; }
    public string PayoutsCashdropsTotal { get; set; }
    public string PayoutsCashdropsCount { get; set; }
    public string DeclaredTips { get; set; }
    public string SafeDrops { get; set; }
    public string VoidedTotal { get; set; }
    public int VoidedItems { get; set; }
    public string ReturnedTotal { get; set; }
    public int ReturnedItems { get; set; }
    public string CompsTotal { get; set; }
    public int CompsItems { get; set; }
    public string ExchangedTotal { get; set; }
    public int ExchangedItems { get; set; }
    public int TotalNumberOfPeople { get; set; }
    public string AvgSalePerPerson { get; set; }
    public string AdjCreditTipsTotal { get; set; }
    public string AdjCreditTips { get; set; }
    public string AdjVisaTips { get; set; }
    public string AdjVisaTipsTotal { get; set; }
    public string AdjMastercardTips { get; set; }
    public string AdjMastercardTipsTotal { get; set; }
    public string AdjAmericanExpressTips { get; set; }
    public string AdjAmexTips { get; set; }
    public string AdjAmericanExpressTipsTotal { get; set; }
    public string AdjAmexTipsTotal { get; set; }
    public string AdjOtherCreditCardTipsTotal { get; set; }
    public string AdjOtherCreditCardTips { get; set; }
    public string AdjPaypalTips { get; set; }
    public string AdjPaypalTipsTotal { get; set; }
    public string AdjDiscoverTips { get; set; }
    public string AdjDiscoverTipsTotal { get; set; }
    public string AdjNonCashTipsTotalMinusCash { get; set; }
    public string AdjTipsTotal { get; set; }
    public string AdjPayableTipsTotal { get; set; }
    public string AdjDeclinedTipsTotal { get; set; }
    public string AdjTotal { get; set; }
    public int TotalInvoices { get; set; }
    public int TotalOrders { get; set; }
    public string AvgSale { get; set; }
    public string NonCashTipsTotalMinusCash { get; set; }
    public string NonCashTips { get; set; }
    public string AdjNonCashTips { get; set; }
    public string PayinsPayouts { get; set; }
    public string TipIn { get; set; }
    public string CashDuePayments { get; set; }
    public string CashPayments { get; set; }
    public CustomPayments CustomPayments { get; set; }
    public Vouchers Vouchers { get; set; }
    public CountedDiscounts CountedDiscounts { get; set; }
    public bool ShowDonations { get; set; }
}

public class CustomPayments
{
    public Payment202 Payment_202 { get; set; }
    public Payment203 Payment_203 { get; set; }
    public Payment200 Payment_200 { get; set; }
    public Payment201 Payment_201 { get; set; }
    public Payment206 Payment_206 { get; set; }
    public Payment207 Payment_207 { get; set; }
    public Payment204 Payment_204 { get; set; }
    public Payment205 Payment_205 { get; set; }
}

public class Vouchers
{
}

public class CountedDiscounts
{
}

public class Payment200
{
    public string Name { get; set; }
    public string Refunds { get; set; }
    public string Gratuity { get; set; }
    public string Qty { get; set; }
    public string ForSales { get; set; }
    public string Amount { get; set; }
    public string TotalsWithRefunds { get; set; }
    public string ForDeposits { get; set; }
    public string Tips { get; set; }
    public string Total { get; set; }
    public string HouseAccount { get; set; }
}

public class Payment201
{
    public string Name { get; set; }
    public string Refunds { get; set; }
    public string Gratuity { get; set; }
    public string Qty { get; set; }
    public string ForSales { get; set; }
    public string Amount { get; set; }
    public string TotalsWithRefunds { get; set; }
    public string ForDeposits { get; set; }
    public string Tips { get; set; }
    public string Total { get; set; }
    public string HouseAccount { get; set; }
}

public class Payment202
{
    public string Name { get; set; }
    public string Refunds { get; set; }
    public string Gratuity { get; set; }
    public string Qty { get; set; }
    public string ForSales { get; set; }
    public string Amount { get; set; }
    public string TotalsWithRefunds { get; set; }
    public string ForDeposits { get; set; }
    public string Tips { get; set; }
    public string Total { get; set; }
    public string HouseAccount { get; set; }
}

public class Payment203
{
    public string Name { get; set; }
    public string Refunds { get; set; }
    public string Gratuity { get; set; }
    public string Qty { get; set; }
    public string ForSales { get; set; }
    public string Amount { get; set; }
    public string TotalsWithRefunds { get; set; }
    public string ForDeposits { get; set; }
    public string Tips { get; set; }
    public string Total { get; set; }
    public string HouseAccount { get; set; }
}

public class Payment204
{
    public string Name { get; set; }
    public string Refunds { get; set; }
    public string Gratuity { get; set; }
    public string Qty { get; set; }
    public string ForSales { get; set; }
    public string Amount { get; set; }
    public string TotalsWithRefunds { get; set; }
    public string ForDeposits { get; set; }
    public string Tips { get; set; }
    public string Total { get; set; }
    public string HouseAccount { get; set; }
}

public class Payment205
{
    public string Name { get; set; }
    public string Refunds { get; set; }
    public string Gratuity { get; set; }
    public string Qty { get; set; }
    public string ForSales { get; set; }
    public string Amount { get; set; }
    public string TotalsWithRefunds { get; set; }
    public string ForDeposits { get; set; }
    public string Tips { get; set; }
    public string Total { get; set; }
    public string HouseAccount { get; set; }
}
public class Payment206
{
    public string Name { get; set; }
    public string Refunds { get; set; }
    public string Gratuity { get; set; }
    public string Qty { get; set; }
    public string ForSales { get; set; }
    public string Amount { get; set; }
    public string TotalsWithRefunds { get; set; }
    public string ForDeposits { get; set; }
    public string Tips { get; set; }
    public string Total { get; set; }
    public string HouseAccount { get; set; }
}

public class Payment207
{
    public string Name { get; set; }
    public string Refunds { get; set; }
    public string Gratuity { get; set; }
    public string Qty { get; set; }
    public string ForSales { get; set; }
    public string Amount { get; set; }
    public string TotalsWithRefunds { get; set; }
    public string ForDeposits { get; set; }
    public string Tips { get; set; }
    public string Total { get; set; }
    public string HouseAccount { get; set; }
}

Don't know why it was designed this way, but it's what I have to work with. The problem I haven't been able to figure out is how to access it when the json has multiple array elements. When I try to deserialize it:

C#:
var sales = JsonConvert.DeserializeObject<List<Sales_data>>(content);

I get this error:

{"Cannot deserialize the current JSON object (e.g. {\"name\":\"value\"}) into type 'System.Collections.Generic.List`1[Sales_data]' because the type requires a JSON array (e.g. [1,2,3]) to deserialize correctly.\r\nTo fix this error either change the JSON to a JSON array (e.g. [1,2,3]) or change the deserialized type so that it is a normal .NET type (e.g. not a primitive type like integer, not a collection type like an array or List<T>) that can be deserialized from a JSON object. JsonObjectAttribute can also be added to the type to force it to deserialize from a JSON object.\r\nPath 'revenue_centers', line 1, position 19."}

I know I can strip out everything except the Sales_data portion and then deserialize it to get it working, but I know that isn't the way I should do it and that there probably is a very standard way most developers would do it. I haven't had to ever deserialize when my json string contains multiple arrays like this so I'm unsure of the right way to go about doing it. Any help would be greatly appreciated.

Thanks!

James
 
Dig a little deeper into the JSON.NET documentation. Specifically, look in the section of their documentation regarding using LINQ.
 
Back
Top Bottom