{"id":163283,"date":"2021-01-26T16:00:33","date_gmt":"2021-01-26T13:00:33","guid":{"rendered":"https:\/\/en.buradabiliyorum.com\/how-to-work-with-json-in-php-cloudsavvy-it\/"},"modified":"2021-01-26T16:00:33","modified_gmt":"2021-01-26T13:00:33","slug":"how-to-work-with-json-in-php-cloudsavvy-it","status":"publish","type":"post","link":"https:\/\/buradabiliyorum.com\/en\/how-to-work-with-json-in-php-cloudsavvy-it\/","title":{"rendered":"#How to Work With JSON in PHP \u2013 CloudSavvy IT"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-custom ez-toc-container-direction\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">Table of Contents<\/p>\n<label for=\"ez-toc-cssicon-toggle-item-6a40a45a387f7\" class=\"ez-toc-cssicon-toggle-label\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #dd3333;color:#dd3333\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #dd3333;color:#dd3333\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/label><input type=\"checkbox\"  id=\"ez-toc-cssicon-toggle-item-6a40a45a387f7\" checked aria-label=\"Toggle\" \/><nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-work-with-json-in-php-cloudsavvy-it\/#Reading_JSON_Data\" >Reading JSON Data<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-work-with-json-in-php-cloudsavvy-it\/#Handling_Parsing_Errors\" >Handling Parsing Errors<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-work-with-json-in-php-cloudsavvy-it\/#Serializing_data_to_JSON\" >Serializing data to JSON<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/buradabiliyorum.com\/en\/how-to-work-with-json-in-php-cloudsavvy-it\/#Bringing_JSON_to_Your_Applications_Domain_Layer\" >Bringing JSON to Your Application\u2019s Domain Layer<\/a><\/li><\/ul><\/nav><\/div>\n<p><strong>&#8220;#How to Work With JSON in PHP \u2013 CloudSavvy IT&#8221;<\/strong><\/p>\n<div id=\"article-content-area\">\n<img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-4047\" src=\"https:\/\/www.cloudsavvyit.com\/thumbcache\/0\/0\/b835749967babe94be45e3edd2508d9c\/p\/uploads\/2017\/08\/1ac500da.png\" alt=\"PHP Logo\" width=\"1400\" height=\"600\" onload=\"pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\" onerror=\"this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);\"\/><\/p>\n<p>JSON is one of the most commonly used data serialization formats. It\u2019s grown from its origins within Java<a href=\"https:\/\/buradabiliyorum.com\/en\/category\/download-scripts-themes-apps\/\" data-internallinksmanager029f6b8e52c=\"9\" title=\"Download Scripts &amp; Themes &amp; Apps\" target=\"_blank\" rel=\"noopener\">Script<\/a> (JSON means JavaScript Object Notation) to become the format of choice for many web APIs and configuration systems.<\/p>\n<p>PHP ships with built-in JSON support. Historically, the features were provided as a separate extension. The 2020 launch of PHP 8.0 converted JSON into <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/wiki.php.net\/rfc\/always_enable_json\">a permanently active<\/a> extension which cannot be removed.<\/p>\n<h2 id=\"reading-json-data\"><span class=\"ez-toc-section\" id=\"Reading_JSON_Data\"><\/span>Reading JSON Data<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>To parse JSON data, use the <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.php.net\/manual\/en\/function.json-decode.php\"><code>json_decode()<\/code><\/a> function. Its full signature is as follows:<\/p>\n<div class=\"wp-geshi-highlight-wrap5\">\n<div class=\"wp-geshi-highlight-wrap4\">\n<div class=\"wp-geshi-highlight-wrap3\">\n<div class=\"wp-geshi-highlight-wrap2\">\n<div class=\"wp-geshi-highlight-wrap\">\n<div class=\"wp-geshi-highlight\">\n<div class=\"php\">\n<pre class=\"de1\"><span class=\"kw3\">json_decode<\/span><span class=\"br0\">(<\/span>string <span class=\"re0\">$json<\/span><span class=\"sy0\">,<\/span> bool<span class=\"sy0\">|<\/span><span class=\"kw4\">null<\/span> <span class=\"re0\">$associative<\/span><span class=\"sy0\">=<\/span><span class=\"kw4\">null<\/span><span class=\"sy0\">,<\/span> int <span class=\"re0\">$depth<\/span><span class=\"sy0\">=<\/span><span class=\"nu0\">512<\/span><span class=\"sy0\">,<\/span> int <span class=\"re0\">$flags<\/span><span class=\"sy0\">=<\/span><span class=\"nu0\">0<\/span><span class=\"br0\">)<\/span> <span class=\"sy0\">:<\/span> mixed<span class=\"sy0\">;<\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>The simplest invocation is to pass a JSON string with no other arguments. We\u2019ll work with <code>{\"foo\": \"bar\"}<\/code> which decodes to an instance of PHP\u2019s generic <code>stdClass<\/code>. Our new object will have a property <code>foo<\/code> with the value of <code>bar<\/code>.<\/p>\n<p>If you\u2019d rather receive an associative array, pass <code>true<\/code> to the <code>$associative<\/code> parameter of <code>json_decode()<\/code>. The above example would then decode to <code>[\"foo\" =&gt; \"bar\"]<\/code>.<\/p>\n<p>The <code>$depth<\/code> parameter lets you control the maximum nesting level to parse down to. You\u2019ll get <code>null<\/code> if the JSON nests deeper than the set level \u2013 no attempt will be made to parse the data.<\/p>\n<p>The <code>$flags<\/code> parameter accepts a bitmask of optional flags that alter the parsing behaviour. These are <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.php.net\/manual\/en\/json.constants.php\">described in detail<\/a> within the PHP manual and allow you to define how specific data types should be handled.<\/p>\n<h2 id=\"handling-parsing-errors\"><span class=\"ez-toc-section\" id=\"Handling_Parsing_Errors\"><\/span>Handling Parsing Errors<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>By default, <code>json_decode()<\/code> will return <code>null<\/code> when it\u2019s passed an invalid JSON string. This presents an issue because an isolated <code>null<\/code> is a valid JSON string. You\u2019ve no way of knowing whether the <code>null<\/code> return value is due to the JSON <em>containing<\/em> <code>null<\/code>, or because the JSON was malformed and couldn\u2019t be parsed.<\/p>\n<p>PHP 7.3 finally addressed this longstanding problem by adding the <code>JSON_THROW_ON_ERROR<\/code> flag. Pass this constant to the <code>$flags<\/code> parameter of <code>json_decode()<\/code> to make PHP throw an exception when invalid JSON is encountered:<\/p>\n<div class=\"wp-geshi-highlight-wrap5\">\n<div class=\"wp-geshi-highlight-wrap4\">\n<div class=\"wp-geshi-highlight-wrap3\">\n<div class=\"wp-geshi-highlight-wrap2\">\n<div class=\"wp-geshi-highlight-wrap\">\n<div class=\"wp-geshi-highlight\">\n<div class=\"php\">\n<pre class=\"de1\"><span class=\"kw3\">json_decode<\/span><span class=\"br0\">(<\/span><span class=\"st0\">\"['malformed json\"<\/span><span class=\"sy0\">,<\/span> <span class=\"kw4\">true<\/span><span class=\"sy0\">,<\/span> <span class=\"nu0\">512<\/span><span class=\"sy0\">,<\/span> JSON_THROW_ON_ERROR<span class=\"br0\">)<\/span><span class=\"sy0\">;<\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Enabling this behaviour is <a href=\"https:\/\/buradabiliyorum.com\/en\/category\/general\/\" data-internallinksmanager029f6b8e52c=\"3\" title=\"General\" target=\"_blank\" rel=\"noopener\">general<\/a>ly desirable but it does make for a rather unwieldy invocation. You can use PHP 8\u2019s named arguments to simplify things a bit, as you won\u2019t need to pass explicit values for the optional parameters:<\/p>\n<div class=\"wp-geshi-highlight-wrap5\">\n<div class=\"wp-geshi-highlight-wrap4\">\n<div class=\"wp-geshi-highlight-wrap3\">\n<div class=\"wp-geshi-highlight-wrap2\">\n<div class=\"wp-geshi-highlight-wrap\">\n<div class=\"wp-geshi-highlight\">\n<div class=\"php\">\n<pre class=\"de1\"><span class=\"kw3\">json_decode<\/span><span class=\"br0\">(<\/span>json<span class=\"sy0\">:<\/span> <span class=\"st0\">\"['malformed json\"<\/span><span class=\"sy0\">,<\/span> flags<span class=\"sy0\">:<\/span> JSON_THROW_ON_ERROR<span class=\"br0\">)<\/span><span class=\"sy0\">;<\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>The two examples shown above are equivalent to each other. The only difference is the latter syntax requires PHP 8.<\/p>\n<h2 id=\"serializing-data-to-json\"><span class=\"ez-toc-section\" id=\"Serializing_data_to_JSON\"><\/span>Serializing data to JSON<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>You can serialize PHP values into JSON strings using the <code><a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.php.net\/manual\/en\/function.json-encode.php\">json_encode()<\/a><\/code> function. Its signature is as follows:<\/p>\n<div class=\"wp-geshi-highlight-wrap5\">\n<div class=\"wp-geshi-highlight-wrap4\">\n<div class=\"wp-geshi-highlight-wrap3\">\n<div class=\"wp-geshi-highlight-wrap2\">\n<div class=\"wp-geshi-highlight-wrap\">\n<div class=\"wp-geshi-highlight\">\n<div class=\"php\">\n<pre class=\"de1\"><span class=\"kw3\">json_encode<\/span><span class=\"br0\">(<\/span>mixed <span class=\"re0\">$value<\/span><span class=\"sy0\">,<\/span> int <span class=\"re0\">$flags<\/span><span class=\"sy0\">=<\/span><span class=\"nu0\">0<\/span><span class=\"sy0\">,<\/span> int <span class=\"re0\">$depth<\/span><span class=\"sy0\">=<\/span><span class=\"nu0\">512<\/span><span class=\"br0\">)<\/span> <span class=\"sy0\">:<\/span> string<span class=\"sy0\">|<\/span><span class=\"kw4\">false<\/span><span class=\"sy0\">;<\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>PHP accepts any value as <code>$value<\/code>, except for resources. Data types are automatically handled to ensure they have an appropriate mapping in the generated JSON. PHP objects and associative arrays will become JSON objects containing all the enumerable property\/key-value pairs of the input value. PHP scalar types map directly into JSON with no transformation.<\/p>\n<p>Like its decoding counterpart, <code>json_encode()<\/code> accepts <code>$flags<\/code> and <code>$depth<\/code> parameters. Take care around the order though \u2013 in a quirk of the PHP standard library, the position of these two optional parameters is switched compared to <code>json_decode()<\/code>.<\/p>\n<p>Many more flags are supported when encoding data. Here\u2019s some to be aware of:<\/p>\n<ul>\n<li><strong><code>JSON_FORCE_OBJECT<\/code><\/strong> \u2013 Convert PHP numerical arrays to JSON objects instead of arrays. This handles the case where a variable contains an associative array which might be empty. When the array <em>is<\/em> empty (<code>[]<\/code>), a JSON array would be created; when it\u2019s not empty (<code>[\"foo\" =&gt; \"bar\"]<\/code>), an object would be emitted instead. Enabling this flag ensures an object is always used in the encoded JSON.<\/li>\n<li><strong><code>JSON_PRETTY_PRINT<\/code><\/strong> \u2013 PHP\u2019s JSON output is normally minified which is ideal when sending it over the network as part of an HTTP request. Setting this flag will add new line characters and automatic indentation to the JSON string, making it more suitable for configuration files and other scenarios where humans will read the output.<\/li>\n<li><strong><code>JSON_PRESERVE_ZERO_FRACTION<\/code><\/strong> \u2013 Forces PHP to encode floats such as <code>0.0<\/code> exactly, instead of shaving off the fraction to write <code>0<\/code> into the JSON (which could be incorrectly parsed as an integer).<\/li>\n<li><strong><code>JSON_NUMERIC_CHECK<\/code><\/strong> \u2013 Automatically converts numeric strings to numbers in the JSON output, instead of preserving them as strings. With this enabled, a PHP value <code>\"234.5\"<\/code> will be emitted as <code>234.5<\/code> in the JSON.<\/li>\n<li><strong><code>JSON_PARTIAL_OUTPUT_ON_ERROR<\/code><\/strong> \u2013 Try to continue writing even after an encoding error is encountered. PHP will try to substitute invalid values in order to produce some output, even if it\u2019s not complete.<\/li>\n<\/ul>\n<p>You can obtain the full <a rel=\"nofollow noopener\" target=\"_blank\" href=\"https:\/\/www.php.net\/manual\/en\/json.constants.php\">list of flags<\/a> within the PHP documentation. The remainder are mostly specific options to customise the encoding used in particular scenarios.<\/p>\n<h2 id=\"bringing-json-to-your-applications-domain-layer\"><span class=\"ez-toc-section\" id=\"Bringing_JSON_to_Your_Applications_Domain_Layer\"><\/span>Bringing JSON to Your Application\u2019s Domain Layer<span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p>Complex web backends are most likely to use PHP\u2019s JSON features within the context of emitting HTTP responses. That probably means you\u2019ll be encoding instances of domain-layer classes, such as <code>BlogPost<\/code>.<\/p>\n<p>Calling <code>json_encode()<\/code> with an instance of a class results in a JSON string containing a single object. PHP will enumerate the <em>public<\/em> properties of the class and add them as key\/value pairs into the JSON-encoded object.<\/p>\n<div class=\"wp-geshi-highlight-wrap5\">\n<div class=\"wp-geshi-highlight-wrap4\">\n<div class=\"wp-geshi-highlight-wrap3\">\n<div class=\"wp-geshi-highlight-wrap2\">\n<div class=\"wp-geshi-highlight-wrap\">\n<div class=\"wp-geshi-highlight\">\n<div class=\"php\">\n<pre class=\"de1\"><span class=\"kw2\">class<\/span> BlogPost <span class=\"br0\">{<\/span>\n    <span class=\"kw2\">protected<\/span> int <span class=\"re0\">$Id<\/span> <span class=\"sy0\">=<\/span> <span class=\"nu0\">1<\/span><span class=\"sy0\">;<\/span>\n    <span class=\"kw2\">public<\/span> string <span class=\"re0\">$Title<\/span> <span class=\"sy0\">=<\/span> <span class=\"st0\">\"Example\"<\/span><span class=\"sy0\">;<\/span>\n<span class=\"br0\">}<\/span>\n\u00a0\n<span class=\"co1\">\/\/ produces '{\"Title\": \"Example\"}'<\/span>\n<span class=\"re0\">$json<\/span> <span class=\"sy0\">=<\/span> <span class=\"kw3\">json_encode<\/span><span class=\"br0\">(<\/span><span class=\"kw2\">new<\/span> BlogPost<span class=\"br0\">(<\/span><span class=\"br0\">)<\/span><span class=\"br0\">)<\/span><span class=\"sy0\">;<\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>PHP can\u2019t automatically access protected or private properties. This default implementation is therefore insufficient for all but the simplest of classes. Instead, your classes can implement the <code>JsonSerializable<\/code> interface. This allows you to define how instances will be transformed to JSON.<\/p>\n<p><code>JsonSerializable<\/code> defines a single method, <code>jsonSerialize()<\/code>, which PHP will call whenever an instance needs to be serialised to JSON:<\/p>\n<div class=\"wp-geshi-highlight-wrap5\">\n<div class=\"wp-geshi-highlight-wrap4\">\n<div class=\"wp-geshi-highlight-wrap3\">\n<div class=\"wp-geshi-highlight-wrap2\">\n<div class=\"wp-geshi-highlight-wrap\">\n<div class=\"wp-geshi-highlight\">\n<div class=\"php\">\n<pre class=\"de1\"><span class=\"kw2\">class<\/span> BlogPost <span class=\"kw2\">implements<\/span> JsonSerializable <span class=\"br0\">{<\/span>\n    <span class=\"kw2\">protected<\/span> int <span class=\"re0\">$Id<\/span> <span class=\"sy0\">=<\/span> <span class=\"nu0\">1<\/span><span class=\"sy0\">;<\/span>\n    <span class=\"kw2\">public<\/span> string <span class=\"re0\">$Title<\/span> <span class=\"sy0\">=<\/span> <span class=\"st0\">\"Example\"<\/span><span class=\"sy0\">;<\/span>\n\u00a0\n    <span class=\"kw2\">public<\/span> <span class=\"kw2\">function<\/span> jsonSerialize<span class=\"br0\">(<\/span><span class=\"br0\">)<\/span> <span class=\"br0\">{<\/span>\n        <span class=\"kw1\">return<\/span> <span class=\"br0\">[<\/span>\n            <span class=\"st0\">\"Id\"<\/span> <span class=\"sy0\">=&gt;<\/span> <span class=\"re0\">$this<\/span> <span class=\"sy0\">-&gt;<\/span> <span class=\"me1\">Id<\/span><span class=\"sy0\">,<\/span>\n            <span class=\"st0\">\"Title\"<\/span> <span class=\"sy0\">=&gt;<\/span> <span class=\"re0\">$this<\/span> <span class=\"sy0\">-&gt;<\/span> <span class=\"me1\">Title<\/span>\n        <span class=\"br0\">]<\/span><span class=\"sy0\">;<\/span>\n    <span class=\"br0\">}<\/span>\n<span class=\"br0\">}<\/span>\n\u00a0\n<span class=\"co1\">\/\/ produces '{\"Id\": 1, \"Title\": \"Example\"}'<\/span>\n<span class=\"re0\">$json<\/span> <span class=\"sy0\">=<\/span> <span class=\"kw3\">json_encode<\/span><span class=\"br0\">(<\/span><span class=\"kw2\">new<\/span> BlogPost<span class=\"br0\">(<\/span><span class=\"br0\">)<\/span><span class=\"br0\">)<\/span><span class=\"sy0\">;<\/span><\/pre>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p>Implementing <code>JsonSerializable<\/code> allows you to take control of the serialization process. Your instances can choose what to expose, which might include protected properties, dynamically computed values and data returned from method calls.<\/p>\n<p>You don\u2019t even need to return an array. The <code>jsonSerializable<\/code> method signature specifies a <code>mixed<\/code> return type, so you can provide any value which PHP can serialize to JSON. You could return another object to have PHP serialize it recursively.\n<\/div>\n<blockquote><p><strong><span style=\"color: #ff6600;\">If you liked the article, do not forget to share it with your friends. Follow us on\u00a0<span style=\"color: #ff0000;\"><a style=\"color: #ff0000;\" href=\"https:\/\/news.google.com\/publications\/CAAqBwgKMLG0nwswvr63Aw\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Google News<\/a><\/span>\u00a0too, click on the star and choose us from your favorites.<\/span><\/strong><\/p><\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\">For forums sites go to <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/forum.buradabiliyorum.com\/\" target=\"_blank\" rel=\"noopener\">Forum.BuradaBiliyorum.Com<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<blockquote>\n<p style=\"text-align: center;\"><strong>If you want to read more like this article, you can visit our <span style=\"color: #ff9900;\"><a style=\"color: #ff9900;\" href=\"https:\/\/en.buradabiliyorum.com\/technology\/\" target=\"_blank\" rel=\"noopener\">Technology category.<\/a><\/span><\/strong><\/p>\n<\/blockquote>\n<p><span style=\"color: black;\"><a style=\"color: #ff9900;\" href=\"https:\/\/www.cloudsavvyit.com\/9134\/how-to-work-with-json-in-php\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>&#8220;#How to Work With JSON in PHP \u2013 CloudSavvy IT&#8221; JSON is one of the most commonly used data serialization formats. It\u2019s grown from its origins within JavaScript (JSON means JavaScript Object Notation) to become the format of choice for many web APIs and configuration systems. PHP ships with built-in JSON support. Historically, the features&#8230;<\/p>\n","protected":false},"author":1,"featured_media":163284,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"fifu_image_url":"https:\/\/www.cloudsavvyit.com\/p\/uploads\/2017\/08\/1ac500da.png","fifu_image_alt":"","footnotes":""},"categories":[18],"tags":[],"class_list":["post-163283","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology"],"_links":{"self":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/163283","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/comments?post=163283"}],"version-history":[{"count":0,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/posts\/163283\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media\/163284"}],"wp:attachment":[{"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/media?parent=163283"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/categories?post=163283"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/buradabiliyorum.com\/en\/wp-json\/wp\/v2\/tags?post=163283"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}