我一直在努力使用以下代码使其可用,但我不知道它是什么类型的数据。
这部分是从 ERPNext 发布到我的 webhook 的有效负载中提取的。我已经深入研究了数据的特定部分,但它似乎混合了不同的数据类型。
Array
(
[{"stock_qty": 131.0, "base_price_list_rate": 4500.0, "image": "", "creation": "2019-04-02 22:33:56.356904", "base_amount": 589500.0, "qty": 131.0, "margin_rate_or_amount": 0.0, "rate": 4500.0, "total_weight": 0.0, "ensure_delivery_based_on_produced_serial_no": 0, "owner": "Administrator", "target_warehouse": null, "stock_uom": "Nos", "base_net_amount": 589500.0, "page_break": 0, "modified_by": "Administrator", "base_net_rate": 4500.0, "discount_percentage": 0.0, "item_name": "5277", "amount": 589500.0, "actual_qty": 0.0, "net_rate": 4500.0, "conversion_factor": 1.0, "base_rate_with_margin": 0.0, "supplier": null, "docstatus": 1, "prevdoc_docname": null, "uom": "Nos", "ordered_qty": 0.0, "doctype": "Sales Order Item", "description": "5277", "parent": "SAL-ORD-2019-00019", "gross_profit": 589500.0, "returned_qty": 0.0, "brand": null, "base_rate": 4500.0, "item_code": "5277", "produced_qty": 0.0, "projected_qty": -453.0, "warehouse": "Stores - AFSPK", "margin_type": "", "billed_amt": 0.0, "rate_with_margin": 0.0, "pricing_rule": null, "delivered_qty": 0.0, "delivered_by_supplier": 0, "discount_amount": 0.0, "price_list_rate": 4500.0, "weight_uom": null, "transaction_date": "2019-04-02", "name": "f94099637a", "idx": 1, "item_tax_rate": "{}", "item_group": "Products", "planned_qty": 0.0, "modified": "2019-04-02 22:34:00.282021", "weight_per_unit": 0.0, "work_order_qty": 0.0, "parenttype": "Sales Order", "customer_item_code": null, "blanket_order_rate": 0.0, "valuation_rate": 0.0, "net_amount": 589500.0, "blanket_order": null, "delivery_date": "2019-06-28", "parentfield": "items"}] => Array
(
[, "customer_address": null, "customer_name": "Muhammad", "name": "SAL-ORD-2019-00019", "title": "Muhammad"}] =>
)
)
以下是来自有效载荷的原始 json 解码数据
Array
(
[data] =>
[{"items": ] => Array
(
[{"stock_qty": 131.0, "base_price_list_rate": 4500.0, "image": "", "creation": "2019-04-02 22:33:56.356904", "base_amount": 589500.0, "qty": 131.0, "margin_rate_or_amount": 0.0, "rate": 4500.0, "total_weight": 0.0, "ensure_delivery_based_on_produced_serial_no": 0, "owner": "Administrator", "target_warehouse": null, "stock_uom": "Nos", "base_net_amount": 589500.0, "page_break": 0, "modified_by": "Administrator", "base_net_rate": 4500.0, "discount_percentage": 0.0, "item_name": "5277", "amount": 589500.0, "actual_qty": 0.0, "net_rate": 4500.0, "conversion_factor": 1.0, "base_rate_with_margin": 0.0, "supplier": null, "docstatus": 1, "prevdoc_docname": null, "uom": "Nos", "ordered_qty": 0.0, "doctype": "Sales Order Item", "description": "5277", "parent": "SAL-ORD-2019-00019", "gross_profit": 589500.0, "returned_qty": 0.0, "brand": null, "base_rate": 4500.0, "item_code": "5277", "produced_qty": 0.0, "projected_qty": -453.0, "warehouse": "Stores - AFSPK", "margin_type": "", "billed_amt": 0.0, "rate_with_margin": 0.0, "pricing_rule": null, "delivered_qty": 0.0, "delivered_by_supplier": 0, "discount_amount": 0.0, "price_list_rate": 4500.0, "weight_uom": null, "transaction_date": "2019-04-02", "name": "f94099637a", "idx": 1, "item_tax_rate": "{}", "item_group": "Products", "planned_qty": 0.0, "modified": "2019-04-02 22:34:00.282021", "weight_per_unit": 0.0, "work_order_qty": 0.0, "parenttype": "Sales Order", "customer_item_code": null, "blanket_order_rate": 0.0, "valuation_rate": 0.0, "net_amount": 589500.0, "blanket_order": null, "delivery_date": "2019-06-28", "parentfield": "items"}] => Array
(
[, "customer_address": null, "customer_name": "Muhammad", "name": "SAL-ORD-2019-00019", "title": "Muhammad"}] =>
)
)
[headers] => Array
(
)
)
我期待着像这样干净的东西
Array
(
[stock_qty] => 131.0
[base_price_list_rate] => 4500.0
[creation] => 2019-04-02 22:33:56.356904
[base_amount] => 589500.0
)