Skip to content

Cant parse json if an attribute have text/json. #675

@leitom

Description

@leitom

Steps required to reproduce the problem

  1. Use the following json and run it through: php (new Printer)->print($json, ' ')

$json = {"type": "auth-token", "error": "Server error: POST https://wsx.xxxxxxx.net/sms/send resulted in a 500 Internal Server Error response:\n{"status":106000,"description":"Unknown error","translatedDescription":null}", "queue": "auth", "token": "XXXXX", "origin": "XXXXXX", "identifier": null, "recipients": [{"email": "xxxxxx@xxxxxx.com", "mobile": "11111111", "mobile_country_code": "0047"}], "request_ip": "x.xxx.xx.xxx", "destination": "004711111111", "consignor_id": null, "sms_error_code": null, "sms_error_description": null}

Expected Result

  • Valid JSON.

Actual Result

  • is not valid JSON.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions