File tree Expand file tree Collapse file tree
user_guide_src/source/incoming Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -90,7 +90,6 @@ You can grab the contents of ``php://input`` as a JSON stream with ``getJSON()``
9090.. note :: This has no way of checking if the incoming data is valid JSON or not, you should only use this
9191 method if you know that you're expecting JSON.
9292
93-
9493.. literalinclude :: incomingrequest/009.php
9594
9695By default, this will return any objects in the JSON data as objects. If you want that converted to associative
@@ -107,15 +106,12 @@ the JSON stream. Using ``getVar()`` in this way will always return an object.
107106You can get a specific piece of data from a JSON stream by passing a variable name into ``getVar() `` for the
108107data that you want or you can use "dot" notation to dig into the JSON to get data that is not on the root level.
109108
110-
111109.. literalinclude :: incomingrequest/010.php
112110
113-
114111If you want the result to be an associative array instead of an object, you can use ``getJsonVar() `` instead and pass
115112true in the second parameter. This function can also be used if you can't guarantee that the incoming request will have the
116113correct ``CONTENT_TYPE `` header.
117114
118-
119115.. literalinclude :: incomingrequest/011.php
120116
121117.. note :: See the documentation for ``dot_array_search()`` in the ``Array`` helper for more information on "dot" notation.
You can’t perform that action at this time.
0 commit comments