there is a task to make a service that takes on the input string via POST, and process it. the problem is that the string is actually an array, and I can’t figure out how to process it correctly. I couldn’t split it with explode(), because neither the comma nor the arrow separators fit – everything spoils the second key-value pair, where the value is a JSON string. Is there any way to process it? Below is exact incoming string
'Number' => '0000-543392',
'In' => '
{
"RequestID": 8101,
"DateTime": "2023-10-26 16:47:49",
"CheckNumber": "0000-543392",
"DateTimeCheck": "2023-10-26 16:47:44",
"ChannelID": 2,
"SourceID": 1,
"CashDeskID": "c6445ae8-dce2-11e8-80cf-0050560132c4",
"Coupon": false,
"CouponCodes": null,
"CustomerIdentifier": [
{
"CardID": null,
"CustomerID": null,
"CustomerPhone": null,
"TelegramID": null,
"CustomerEmail": null
}
],
"StringAmount": 2,
"Strings": [
{
"ProductID": "56625578-a627-11ed-97b9-00155d05fc14",
"UUID": "56625578-a627-11ed-97b9-00155d05fc14",
"ProductPrice": 28,
"ProductAmount": 1,
"BasePriceID": null,
"Sum": 28,
"ExpirationDate": [
{
"Amount": null,
"ExpirationDate": null
}
],
"TypeLabel_ID": "",
"DataMatrix": []
},
{
"ProductID": "9b86934c-3f30-11ed-97b9-00155d05fc14",
"UUID": "9b86934c-3f30-11ed-97b9-00155d05fc14",
"ProductPrice": 45,
"ProductAmount": 1,
"BasePriceID": null,
"Sum": 45,
"ExpirationDate": [
{
"Amount": null,
"ExpirationDate": null
}
],
"TypeLabel_ID": "",
"DataMatrix": []
}
],
"CheckSum": 73,
"PaymentType": [
{
"PaymentTypeID": 1,
"CurrencyID": 3,
"CurrencyName": "Rub",
"Sum": 0
}
],
"WriteOffBonusType": 3
}
',
'success' => 'false',
'DateTime' => '26-10-23 16:47',
'RequestID' => '71457',
'reqlenght' => 'null',
'timestart' => 'null',
'timeend' => 'null'
explode didnt help…