Uncategorized

Magento 2.4.6. Unable to output data to json

I have a problem with the json output when sending a request to the API. I receive data in this format: "{\n \"name\": \"John\",\n \"age\": 30,\n \"car\": null,\n \"address\": {\n \"street\": \"123 Main St\",\n \"city\": \"Anytown\",\n \"zip\": \"12345\"\n }\n}" I need the data in this format: { "name": "John", "age": 30, "car": null, "address": { […]