{"id":3051,"date":"2020-07-09T10:39:24","date_gmt":"2020-07-09T09:39:24","guid":{"rendered":"https:\/\/ibex.tech\/cloud\/?p=3051"},"modified":"2022-02-17T07:13:47","modified_gmt":"2022-02-17T07:13:47","slug":"json-data-examples","status":"publish","type":"post","link":"https:\/\/ibex.tech\/cloud\/php\/json\/json-data-examples","title":{"rendered":"json data examples"},"content":{"rendered":"\n<h5 class=\"wp-block-heading\">json Array Example 1<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>  {\n    \"Result\": \"OK\",\n    \"SomethingA\": \"1234\",\n    \"SomethingB\": \"A b c d\",\n    \"KeyValueArray\": \n    {\n      \"AnEntryA\": \"20\",\n      \"AnEntryB\": \"25\",\n      \"AnEntryC\": \"1\"\n    },\n    \"SimpleArray\": &#91;\"apples\", \"oranges\", \"pairs\"]\n  }<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\"><br>json Array Example 2<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>  {\n    \"Result\": \"OK\",\n    \"SomethingA\": \"1234\",\n    \"SomethingB\": \"A b c d\",\n    \"KeyValueArray\": \n    &#91;\n      {\n        \"AnEntryA\": \"20\"\n      },\n      {\n        \"AnEntryB\": \"25\"\n      },\n      {\n        \"AnEntryC\": \"1\",\n        \"SomethingElse\": \"Q\"\n      }\n    ],\n    \"SimpleArray\": &#91;\"apples\", \"oranges\", \"pairs\"]\n  }<\/code><\/pre>\n\n\n\n<h5 class=\"wp-block-heading\">json example 2<\/h5>\n\n\n\n<pre class=\"wp-block-code\"><code>return ('{ \"Result\": \"OK\" }');\n\nreturn ('{ \"Result\": \"Error\", \"Reason\": \"Record not found\" }');<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>json Array Example 1 json Array Example 2 json example 2<\/p>\n","protected":false},"author":5,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[109],"tags":[],"class_list":["post-3051","post","type-post","status-publish","format-standard","hentry","category-json"],"_links":{"self":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/3051","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/users\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/comments?post=3051"}],"version-history":[{"count":8,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/3051\/revisions"}],"predecessor-version":[{"id":3109,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/posts\/3051\/revisions\/3109"}],"wp:attachment":[{"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/media?parent=3051"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/categories?post=3051"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibex.tech\/cloud\/wp-json\/wp\/v2\/tags?post=3051"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}