json_explode
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
| — | json_explode [2017/07/06 03:52] (current) – created - external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ======Synopsis: | ||
| + | [[json_explode]](<< | ||
| + | |||
| + | ======Technical: | ||
| + | This function de-serialises a valid [[http:// | ||
| + | |||
| + | JSON object names are converted into valid assign variable names by replacing all non-alphanumeric characters with the underscore character. | ||
| + | |||
| + | If the function fails, the result variable is not modified and a descriptive error string is available from the [[json_error]] function. | ||
| + | |||
| + | ======Returns: | ||
| + | | 1 |The function succeeded.| | ||
| + | |<< | ||
| + | |||
| + | ======Examples: | ||
| + | |||
| + | @ json = [ \ | ||
| + | { \ | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | " | ||
| + | "frame rate": 24 \ | ||
| + | } \ | ||
| + | }] | ||
| + | | ||
| + | if (json_explode(foo $json)) { | ||
| + | echo $foo[format][width] | ||
| + | } else { | ||
| + | echo JSON parse error: $json_error() | ||
| + | } | ||
| + | | ||
| + | ======See Also:====== | ||
| + | [[json_error]], | ||
json_explode.txt · Last modified: 2017/07/06 03:52 by 127.0.0.1
