VS Code 中的液体映射失败
好吧,我有一个简单的映射,我正在使用 VS 代码的 Shopify 预览插件来查看我在代码中做了什么。但我在田里什么也没得到。
这是我的 Liquid 代码,
{
"contact":{
"matchKey": "{{content.Content.CrmId}}",
"matchKeyType": "{{content.Content.Owner}}"
}
}
我想从 Json 中提取信息并创建另一个 json 输出模式。 下面是输入模式:
{
"content":{
"Name": "dwadwadwa",
"Version": "string",
"Sender": "TEST",
"Content": {
"OrderNumber": "string",
"OrderGroupId": 0,
"AffiliateId": "string",
"BillingCurrency": "string",
"CustomerId": "string",
"CrmId": "string",
"CustomerName": "string",
"HandlingTotal": 0,
"MarketId": "string",
"Name": "string",
"Owner": "string",
"OwnerOrg": "string",
"ShippingTotal": 0,
"Status": "string",
"SubTotal": 0,
"TaxTotal": 0,
"Total": 0,
"Modified": "string",
"Created": "string",
"Properties": [
{
"Key": "string",
"Value": "string"
}
],
"Forms": [
{
"ReturnComment": "string",
"ReturnType": "string",
"ReturnAuthCode": "string",
"OrderFormId": 0,
"Name": "string",
"ReceiptNumber": "string",
"BillingAddressId": "string",
"ShippingTotal": 0,
"HandlingTotal": 0,
"TaxTotal": 0,
"DiscountAmount": 0,
"SubTotal": 0,
"Total": 0,
"Status": "string",
"AuthorizedPaymentTotal": 0,
"CapturedPaymentTotal": 0,
"Properties": [
{
"Key": "string",
"Value": "string"
}
],
"Payments": [
{
"Amount": 0,
"AuthorizationCode": "string",
"CustomerName": "string",
"PaymentId": "string",
"PaymentMethodId": "string",
"PaymentMethodName": "string",
"PaymentTypeModel": "string",
"Status": "string",
"TransactionType": "string",
"ValidationCode": "string",
"Properties": [
{
"Key": "string",
"Value": "string"
}
]
}
],
"Shipments":
{
"ShipmentId": 0,
"ShippingMethodId": "string",
"ShippingMethodName": "string",
"ShippingTax": 0,
"ShippingAddressId": "string",
"ShipmentTrackingNumber": "string",
"ShippingDiscountAmount": 0,
"ShippingSubTotal": 0,
"ShippingTotal": 0,
"Status": "string",
"PrevStatus": "string",
"PickListId": "string",
"SubTotal": 0,
"WarehouseCode": "string",
"PickupPoint": "string",
"Properties": [
{
"Key": "string",
"Value": "string"
}
],
"DiscountsModel": [
{
"DiscountId": 0,
"DiscountAmount": 0,
"DiscountCode": "string",
"DiscountName": "string",
"DisplayMessage": "string",
"DiscountValue": 0
}
],
"LineItems": [
{
"LineItemId": 0,
"Code": "string",
"DisplayName": "string",
"PlacedPrice": 0,
"ExtendedPrice": 0,
"DiscountedPrice": 0,
"SalesTax": 0,
"TaxCategoryId": 0,
"Quantity": 0,
"ShippedQuantity": 0,
"ReturnQuantity": 0,
"InventoryTrackingStatus": "string",
"IsInventoryAllocated": true,
"IsGift": true,
"DeliveryInfo": "string",
"ProductUrl": "string",
"ImageUrl": "string",
"Properties": [
{
"Key": "string",
"Value": "string"
}
]
}
]
}
]
}
],
"OrderAddresses": [
{
"OrderGroupAddressId": 0,
"Name": "string",
"FirstName": "string",
"LastName": "string",
"Organization": "string",
"Line1": "string",
"Line2": "string",
"City": "string",
"State": "string",
"CountryCode": "string",
"CountryName": "string",
"PostalCode": "string",
"RegionCode": "string",
"RegionName": "string",
"DaytimePhoneNumber": "string",
"EveningPhoneNumber": "string",
"Email": "string",
"Properties": [
{
"Key": "string",
"Value": "string"
}
]
}
]
}
}
}
任何人都知道这有什么问题,我有点迷路,在互联网上找不到任何东西。
顺便说一句,这是我的输出
{
"contact":{
"matchKey": "",
"matchKeyType": ""
}
}
Alright so I have a simple mapping and I'm using my self of shopify preview plugin for VS code to see what I'm doing in the code. But I'm not getting anything in the fields.
This is my Liquid Code
{
"contact":{
"matchKey": "{{content.Content.CrmId}}",
"matchKeyType": "{{content.Content.Owner}}"
}
}
I want to extract the information from the Json and create another json output schema.
Below is the input schema:
{
"content":{
"Name": "dwadwadwa",
"Version": "string",
"Sender": "TEST",
"Content": {
"OrderNumber": "string",
"OrderGroupId": 0,
"AffiliateId": "string",
"BillingCurrency": "string",
"CustomerId": "string",
"CrmId": "string",
"CustomerName": "string",
"HandlingTotal": 0,
"MarketId": "string",
"Name": "string",
"Owner": "string",
"OwnerOrg": "string",
"ShippingTotal": 0,
"Status": "string",
"SubTotal": 0,
"TaxTotal": 0,
"Total": 0,
"Modified": "string",
"Created": "string",
"Properties": [
{
"Key": "string",
"Value": "string"
}
],
"Forms": [
{
"ReturnComment": "string",
"ReturnType": "string",
"ReturnAuthCode": "string",
"OrderFormId": 0,
"Name": "string",
"ReceiptNumber": "string",
"BillingAddressId": "string",
"ShippingTotal": 0,
"HandlingTotal": 0,
"TaxTotal": 0,
"DiscountAmount": 0,
"SubTotal": 0,
"Total": 0,
"Status": "string",
"AuthorizedPaymentTotal": 0,
"CapturedPaymentTotal": 0,
"Properties": [
{
"Key": "string",
"Value": "string"
}
],
"Payments": [
{
"Amount": 0,
"AuthorizationCode": "string",
"CustomerName": "string",
"PaymentId": "string",
"PaymentMethodId": "string",
"PaymentMethodName": "string",
"PaymentTypeModel": "string",
"Status": "string",
"TransactionType": "string",
"ValidationCode": "string",
"Properties": [
{
"Key": "string",
"Value": "string"
}
]
}
],
"Shipments":
{
"ShipmentId": 0,
"ShippingMethodId": "string",
"ShippingMethodName": "string",
"ShippingTax": 0,
"ShippingAddressId": "string",
"ShipmentTrackingNumber": "string",
"ShippingDiscountAmount": 0,
"ShippingSubTotal": 0,
"ShippingTotal": 0,
"Status": "string",
"PrevStatus": "string",
"PickListId": "string",
"SubTotal": 0,
"WarehouseCode": "string",
"PickupPoint": "string",
"Properties": [
{
"Key": "string",
"Value": "string"
}
],
"DiscountsModel": [
{
"DiscountId": 0,
"DiscountAmount": 0,
"DiscountCode": "string",
"DiscountName": "string",
"DisplayMessage": "string",
"DiscountValue": 0
}
],
"LineItems": [
{
"LineItemId": 0,
"Code": "string",
"DisplayName": "string",
"PlacedPrice": 0,
"ExtendedPrice": 0,
"DiscountedPrice": 0,
"SalesTax": 0,
"TaxCategoryId": 0,
"Quantity": 0,
"ShippedQuantity": 0,
"ReturnQuantity": 0,
"InventoryTrackingStatus": "string",
"IsInventoryAllocated": true,
"IsGift": true,
"DeliveryInfo": "string",
"ProductUrl": "string",
"ImageUrl": "string",
"Properties": [
{
"Key": "string",
"Value": "string"
}
]
}
]
}
]
}
],
"OrderAddresses": [
{
"OrderGroupAddressId": 0,
"Name": "string",
"FirstName": "string",
"LastName": "string",
"Organization": "string",
"Line1": "string",
"Line2": "string",
"City": "string",
"State": "string",
"CountryCode": "string",
"CountryName": "string",
"PostalCode": "string",
"RegionCode": "string",
"RegionName": "string",
"DaytimePhoneNumber": "string",
"EveningPhoneNumber": "string",
"Email": "string",
"Properties": [
{
"Key": "string",
"Value": "string"
}
]
}
]
}
}
}
Anyone know what is wrong with this i'm kinda lost and cannot find anything on the internet.
This is my output btw
{
"contact":{
"matchKey": "",
"matchKeyType": ""
}
}
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论