{"id":20040,"date":"2022-11-08T13:37:25","date_gmt":"2022-11-08T08:07:25","guid":{"rendered":"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/"},"modified":"2022-11-08T13:37:25","modified_gmt":"2022-11-08T08:07:25","slug":"solved-convert-structure-to-php-array","status":"publish","type":"post","link":"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/","title":{"rendered":"[Solved] Convert structure to PHP array"},"content":{"rendered":"<p> [ad_1]<br \/>\n<\/p>\n<div id=\"answer-47149840\" class=\"answer js-answer accepted-answer js-accepted-answer\" data-answerid=\"47149840\" data-parentid=\"47148003\" data-score=\"4\" data-position-on-page=\"1\" data-highest-scored=\"1\" data-question-has-accepted-highest-score=\"1\" itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n<div class=\"post-layout\">\n<div class=\"votecell post-layout--left\"><\/div>\n<div class=\"answercell post-layout--right\">\n<div class=\"s-prose js-post-body\" itemprop=\"text\">\n<p>Just like I said I would, here your very own Json Object parser.<\/p>\n<p>One word of warning, these kind of things can be more art then science so if your inputs vary from what was in your example, it could have issues.  Given the small sample size (1 document) I make no guarantees on it&#8217;s functionality outside that one example.<\/p>\n<p>I would try to explain how this works, but I fear it would be lost on mere mortals.<\/p>\n<p>Seriously, this was fun, enjoyed the challenge for once.<\/p>\n<pre><code>&lt;?php\nfunction parseJson($subject, $tokens)\n{\n    $types = array_keys($tokens);\n    $patterns = [];\n    $lexer_stream = [];\n\n    $result = false;\n\n    foreach ($tokens as $k=&gt;$v){\n        $patterns[] = \"(?P&lt;$k&gt;$v)\";      \n    } \n    $pattern = \"https:\/\/stackoverflow.com\/\".implode('|', $patterns).\"\/i\";\n\n    if (preg_match_all($pattern, $subject, $matches, PREG_OFFSET_CAPTURE)) {\n        \/\/print_r($matches);\n        foreach ($matches[0] as $key =&gt; $value) {\n            $match = [];\n            foreach ($types as $type) {\n                $match = $matches[$type][$key];\n                if (is_array($match) &amp;&amp; $match[1] != -1) {\n                    break;\n                }\n            }\n\n            $tok  = [\n                'content' =&gt; $match[0],\n                'type' =&gt; $type,\n                'offset' =&gt; $match[1]\n            ];\n\n            $lexer_stream[] = $tok;       \n        }\n\n       $result = parseJsonTokens( $lexer_stream );\n    }\n    return $result;\n} \n\nfunction parseJsonTokens( array &amp;$lexer_stream ){\n\n    $result = [];\n\n    next($lexer_stream); \/\/advnace one\n    $mode=\"key\"; \/\/items start in key mode  ( key =&gt; value )\n\n    $key = '';\n    $value=\"\";\n\n    while($current = current($lexer_stream)){\n        $content = $current['content'];\n        $type = $current['type'];\n\n        switch($type){\n            case 'T_WHITESPACE':\/\/ignore whitespace\n                next($lexer_stream);\n            break;\n            case 'T_STRING':\n                \/\/keys are always strings, but strings are not always keys\n                if( $mode == 'key')\n                    $key .= $content;\n                else\n                    $value .= $content;           \n                next($lexer_stream); \/\/consume a token\n            break;\n            case 'T_COLON':\n                $mode=\"value\"; \/\/change mode key :\n                next($lexer_stream);\/\/consume a token\n            break;\n            case 'T_ENCAP_STRING':\n                $value .= trim(unicode_decode($content),'\"'); \/\/encapsulated strings are always content\n                next($lexer_stream);\/\/consume a token\n            break;   \n            case 'T_NULL':\n                 $value = null; \/\/encapsulated strings are always content\n                 next($lexer_stream);\/\/consume a token\n            break;          \n            case 'T_COMMA':  \/\/comma ends an item               \n                \/\/store\n                $result[$key] = $value;\n                \/\/reset\n                $mode=\"key\"; \/\/items start in key mode  ( key =&gt; value ) \n                $key = '';\n                $value=\"\"; \n                next($lexer_stream);\/\/consume a token\n            break;\n            case 'T_OPEN_BRACE': \/\/start of a sub-block\n                $value = parseJsonTokens($lexer_stream); \/\/recursive\n            break;\n            case 'T_CLOSE_BRACE': \/\/start of a sub-block\n                \/\/store\n                $result[$key] = $value;\n                next($lexer_stream);\/\/consume a token\n                return $result;\n            break;\n            default:\n                print_r($current);\n                trigger_error(\"Unknown token $type value $content\", E_USER_ERROR);\n        }\n\n    }\n\n    if( !$current ) return;   \n    print_r($current);\n    trigger_error(\"Unclosed item $mode for $type value $content\", E_USER_ERROR);\n}\n\n\/\/@see https:\/\/stackoverflow.com\/questions\/2934563\/how-to-decode-unicode-escape-sequences-like-u00ed-to-proper-utf-8-encoded-cha\nfunction replace_unicode_escape_sequence($match) {\n    return mb_convert_encoding(pack('H*', $match[1]), 'UTF-8', 'UCS-2BE');\n}\n\nfunction unicode_decode($str) {\n    return preg_replace_callback('\/\\\\\\\\u([0-9a-f]{4})\/i', 'replace_unicode_escape_sequence', $str);\n}\n\n$str=\"{\n    party:\"bases\",\n    number:\"1\",\n    id:\"xx_3039366\",\n    url:\"systen01-ny.com\",\n    target:\"_self\",\n    address:\"Ch\\u00e3o as Alminhas-Medas,Uteiros de Gatos e Fontes Longaq&lt;br\/&gt;64320-761 ANHADOS LdA\",\n    coordinate:{\n        x:90.995262145996094,\n        y:-1.3394836426\n    },\n    contactDetails:{\n        id:\"366\",\n        phone:\"xxxxxx\",\n        mobile:\"\",\n        fax:\"xxxx 777 235\",\n        c2c:!0\n    },\n    parameters:\"Flex Am\\u00e1vel Silva,hal,,EN_30336,S,786657,1,0,\",\n    text:\"Vila Nova de Loz C\\u00f4a,os melhores vinhos, v\\u00e1rias. Produtor\/exportador\/com\\u00e9rcio\",\n    website:null,\n    mail:\"\",\n    listing:\"paid\",\n    pCode:\"64\",\n    name:\"xpto Am\\u00e1vel Costa\",\n    logo:{src:\"http:\/\/ny.test.gif\",\n    altname:\"xpto Am\\u00e1vel Costa\"},\n    bookingUrl:\"\",\n    ipUrl:\"\",\n    ipLabel:\"\",\n    customerId:\"7657\",\n    addressId:\"98760\",\n    combined:null,\n    showReviews:!0\n}\";\n\n$tokens = [\n    'T_OPEN_BRACE'      =&gt; '\\{',\n    'T_CLOSE_BRACE'     =&gt; '\\}',\n    'T_NULL'            =&gt; '\\bnull\\b',\n    'T_ENCAP_STRING'    =&gt; '\\\".*?(?&lt;!\\\\\\\\)\\\"',\n    'T_COLON'           =&gt; ':',\n    'T_COMMA'           =&gt; ',',\n    'T_STRING'          =&gt; '[-a-z0-9_.!]+',\n    'T_WHITESPACE'      =&gt; '[\\r\\n\\s\\t]+',\n    'T_UNKNOWN'         =&gt; '.+?'\n];\n\nvar_export( parseJson($str, $tokens) );\n<\/code><\/pre>\n<p>Outputs ( this is what everyone wants )<\/p>\n<pre><code>array (\n  'party' =&gt; 'bases',\n  'number' =&gt; '1',\n  'id' =&gt; 'xx_3039366',\n  'url' =&gt; 'systen01-ny.com',\n  'target' =&gt; '_self',\n  'address' =&gt; 'Ch\u00e3o as Alminhas-Medas,Uteiros de Gatos e Fontes Longaq&lt;br\/&gt;64320-761 ANHADOS LdA',\n  'coordinate' =&gt; \n  array (\n    'x' =&gt; '90.995262145996094',\n    'y' =&gt; '-1.3394836426',\n  ),\n  'contactDetails' =&gt; \n  array (\n    'id' =&gt; '366',\n    'phone' =&gt; 'xxxxxx',\n    'mobile' =&gt; '',\n    'fax' =&gt; 'xxxx 777 235',\n    'c2c' =&gt; '!0',\n  ),\n  'parameters' =&gt; 'Flex Am\u00e1vel Silva,hal,,EN_30336,S,786657,1,0,',\n  'text' =&gt; 'Vila Nova de Loz C\u00f4a,os melhores vinhos, v\u00e1rias. Produtor\/exportador\/com\u00e9rcio',\n  'website' =&gt; NULL,\n  'mail' =&gt; '',\n  'listing' =&gt; 'paid',\n  'pCode' =&gt; '64',\n  'name' =&gt; 'xpto Am\u00e1vel Costa',\n  'logo' =&gt; \n  array (\n    'src' =&gt; 'http:\/\/ny.test.gif',\n    'altname' =&gt; 'xpto Am\u00e1vel Costa',\n  ),\n  'bookingUrl' =&gt; '',\n  'ipUrl' =&gt; '',\n  'ipLabel' =&gt; '',\n  'customerId' =&gt; '7657',\n  'addressId' =&gt; '98760',\n  'combined' =&gt; NULL,\n  'showReviews' =&gt; '!0',\n)\n<\/code><\/pre>\n<p>And you can even test it here ( because I am a nice guy )<\/p>\n<p><a rel=\"nofollow noopener\" target=\"_blank\" href=\"http:\/\/sandbox.onlinephpfunctions.com\/code\/3c1dcafb59abbf19f7f3209724dbdd4a46546c57\">http:\/\/sandbox.onlinephpfunctions.com\/code\/3c1dcafb59abbf19f7f3209724dbdd4a46546c57<\/a><\/p>\n<p>I was able to fix the encoding issues <code>\\u00e<\/code> etc with help of this SO post, so a shout out to them, because I hate character encoding.<\/p>\n<p>http:\/\/stackoverflow.com\/questions\/2934563\/how-to-decode-unicode-escape-sequences-like-u00ed-to-proper-utf-8-encoded-char<\/p>\n<p>Man I just love a beautiful piece of code, just umm.<\/p>\n<p>Cheers!<\/p>\n<\/p><\/div>\n<div class=\"mt24\"><\/div>\n<\/div>\n<p>            <span class=\"d-none\" itemprop=\"commentCount\">4<\/span> <\/p><\/div>\n<\/div>\n<p>[ad_2]<\/p>\n<p>solved Convert structure to PHP array <\/p>\n","protected":false},"excerpt":{"rendered":"<p>[ad_1] Just like I said I would, here your very own Json Object parser. One word of warning, these kind of things can be more art then science so if your inputs vary from what was in your example, it could have issues. Given the small sample size (1 document) I make no guarantees on &#8230; <a title=\"[Solved] Convert structure to PHP array\" class=\"read-more\" href=\"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/\" aria-label=\"More on [Solved] Convert structure to PHP array\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[320],"tags":[361,3396,333,356,339],"class_list":["post-20040","post","type-post","status-publish","format-standard","hentry","category-solved","tag-arrays","tag-data-conversion","tag-javascript","tag-json","tag-php"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>[Solved] Convert structure to PHP array - JassWeb<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"[Solved] Convert structure to PHP array - JassWeb\" \/>\n<meta property=\"og:description\" content=\"[ad_1] Just like I said I would, here your very own Json Object parser. One word of warning, these kind of things can be more art then science so if your inputs vary from what was in your example, it could have issues. Given the small sample size (1 document) I make no guarantees on ... Read more\" \/>\n<meta property=\"og:url\" content=\"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/\" \/>\n<meta property=\"og:site_name\" content=\"JassWeb\" \/>\n<meta property=\"article:published_time\" content=\"2022-11-08T08:07:25+00:00\" \/>\n<meta name=\"author\" content=\"Kirat\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Kirat\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/\"},\"author\":{\"name\":\"Kirat\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\"},\"headline\":\"[Solved] Convert structure to PHP array\",\"datePublished\":\"2022-11-08T08:07:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/\"},\"wordCount\":178,\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"keywords\":[\"arrays\",\"data-conversion\",\"javascript\",\"json\",\"php\"],\"articleSection\":[\"Solved\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/\",\"url\":\"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/\",\"name\":\"[Solved] Convert structure to PHP array - JassWeb\",\"isPartOf\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#website\"},\"datePublished\":\"2022-11-08T08:07:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/jassweb.com\/solved\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"[Solved] Convert structure to PHP array\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/jassweb.com\/solved\/#website\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"name\":\"JassWeb\",\"description\":\"Build High-quality Websites\",\"publisher\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/jassweb.com\/solved\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/jassweb.com\/solved\/#organization\",\"name\":\"Jass Web\",\"url\":\"https:\/\/jassweb.com\/solved\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"contentUrl\":\"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png\",\"width\":693,\"height\":132,\"caption\":\"Jass Web\"},\"image\":{\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31\",\"name\":\"Kirat\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750\",\"contentUrl\":\"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750\",\"caption\":\"Kirat\"},\"sameAs\":[\"http:\/\/jassweb.com\"],\"url\":\"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"[Solved] Convert structure to PHP array - JassWeb","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/","og_locale":"en_US","og_type":"article","og_title":"[Solved] Convert structure to PHP array - JassWeb","og_description":"[ad_1] Just like I said I would, here your very own Json Object parser. One word of warning, these kind of things can be more art then science so if your inputs vary from what was in your example, it could have issues. Given the small sample size (1 document) I make no guarantees on ... Read more","og_url":"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/","og_site_name":"JassWeb","article_published_time":"2022-11-08T08:07:25+00:00","author":"Kirat","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Kirat","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/#article","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/"},"author":{"name":"Kirat","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31"},"headline":"[Solved] Convert structure to PHP array","datePublished":"2022-11-08T08:07:25+00:00","mainEntityOfPage":{"@id":"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/"},"wordCount":178,"publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"keywords":["arrays","data-conversion","javascript","json","php"],"articleSection":["Solved"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/","url":"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/","name":"[Solved] Convert structure to PHP array - JassWeb","isPartOf":{"@id":"https:\/\/jassweb.com\/solved\/#website"},"datePublished":"2022-11-08T08:07:25+00:00","breadcrumb":{"@id":"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/jassweb.com\/solved\/solved-convert-structure-to-php-array\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/jassweb.com\/solved\/"},{"@type":"ListItem","position":2,"name":"[Solved] Convert structure to PHP array"}]},{"@type":"WebSite","@id":"https:\/\/jassweb.com\/solved\/#website","url":"https:\/\/jassweb.com\/solved\/","name":"JassWeb","description":"Build High-quality Websites","publisher":{"@id":"https:\/\/jassweb.com\/solved\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/jassweb.com\/solved\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/jassweb.com\/solved\/#organization","name":"Jass Web","url":"https:\/\/jassweb.com\/solved\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/","url":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","contentUrl":"https:\/\/jassweb.com\/wp-content\/uploads\/2021\/02\/jass-website-logo-1.png","width":693,"height":132,"caption":"Jass Web"},"image":{"@id":"https:\/\/jassweb.com\/solved\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/65c9c7b7958150c0dc8371fa35dd7c31","name":"Kirat","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/jassweb.com\/solved\/#\/schema\/person\/image\/","url":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750","contentUrl":"https:\/\/jassweb.com\/solved\/wp-content\/litespeed\/avatar\/1261af3c9451399fa1336d28b98ea3bb.jpg?ver=1775798750","caption":"Kirat"},"sameAs":["http:\/\/jassweb.com"],"url":"https:\/\/jassweb.com\/solved\/author\/jaspritsinghghumangmail-com\/"}]}},"_links":{"self":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/20040","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/comments?post=20040"}],"version-history":[{"count":0,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/posts\/20040\/revisions"}],"wp:attachment":[{"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/media?parent=20040"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/categories?post=20040"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/jassweb.com\/solved\/wp-json\/wp\/v2\/tags?post=20040"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}