L
L
lordning9992019-12-06 01:03:07
PHP
lordning999, 2019-12-06 01:03:07

How to convert ld+json to php array if json is tabbed?

Hello. Tell me how to bring ld + json with tabs into a php array. I translate by deleting \n. Everything is ok translated, but damn the format of the text itself is changing. Guys prompt urgently.
Code example

{
  "@context": "http://schema.org",
  "@type": "QAPage",
  "mainEntity": {
    "@type": "Question",
"name":"Кто такой \"срочник\" и что значит 
служба по 
контракту?","text":"", "author": {
      "@type": "Person",
      "name": "No Book"
    },
    "dateCreated": "2019-12-06T01:01Z+03:00",
    "answerCount": 1,
    "upvoteCount": 0,
"suggestedAnswer": [{
        "@type": "Answer",
        "text": "Деньги 
платят",
        "author": {
          "@type": "Person",
          "name": "Болтун  Первомайский"
        },
    "dateCreated": "2019-12-06T01:02Z+03:00",
        "upvoteCount": 0,
        "url": "https://www.otvet.mail.ru/answer/1955965467"
        }]}}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
DevMan, 2019-12-06
@lordning999

https://ideone.com/Ew80v2

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question