๐ŸŒ
PHP
php.net โ€บ manual โ€บ en โ€บ function.json-decode.php
PHP: json_decode - Manual
You would expect that recoding and re-encoding will always yield the same JSON string, but take this example: $json = '{"0": "No", "1": "Yes"}'; $array = json_decode($json, true); // decode as associative hash print json_encode($array) .
๐ŸŒ
W3Schools
w3schools.com โ€บ php โ€บ func_json_decode.asp
PHP json_decode() Function
$jsonobj = '{"Peter":35,"Ben":37,"Joe":43}'; $obj = json_decode($jsonobj); echo $obj->Peter; echo $obj->Ben; echo $obj->Joe; Run Example ยป
๐ŸŒ
OnlinePHP
onlinephp.io โ€บ json-decode โ€บ examples
json_decode - Examples
Examples of json_decode. Info and examples on json_decode PHP Function
๐ŸŒ
Microsoft Learn
learn.microsoft.com โ€บ en-us โ€บ dotnet โ€บ api โ€บ system.web.helpers.json.decode
Json.Decode Method (System.Web.Helpers) | Microsoft Learn
Converts data in JavaScript Object Notation (JSON) format into the specified strongly typed data list. public static T Decode<T>(string value); static member Decode : string -> 'T ยท Public Shared Function Decode(Of T) (value As String) As T ...
๐ŸŒ
Flutter
api.flutter.dev โ€บ flutter โ€บ dart-convert โ€บ jsonDecode.html
jsonDecode function - dart:convert library - Dart API
const jsonString = '{"text": "foo", "value": 1, "status": false, "extra": null}'; final data = jsonDecode(jsonString); print(data['text']); // foo print(data['value']); // 1 print(data['status']); // false print(data['extra']); // null const jsonArray = ''' [{"text": "foo", "value": 1, "status": true}, {"text": "bar", "value": 2, "status": false}] '''; final List<dynamic> dataList = jsonDecode(jsonArray); print(dataList[0]); // {text: foo, value: 1, status: true} print(dataList[1]); // {text: bar, value: 2, status: false} final item = dataList[0]; print(item['text']); // foo print(item['value']); // 1 print(item['status']); // false
๐ŸŒ
GeeksforGeeks
geeksforgeeks.org โ€บ php โ€บ php-json_decode-function
PHP | json_decode() Function - GeeksforGeeks
July 11, 2025 - json_decode( $json, $assoc = FALSE, $depth = 512, $options = 0 ) Parameters: This function accepts four parameters as mentioned above and described below:
๐ŸŒ
Tutorialspoint
tutorialspoint.com โ€บ php โ€บ php_function_javascript_object_notation_json_decode.htm
PHP - json_decode() Function
<?php // Assign a JSON object to a variable $someJSON = '{"name" : "Raja", "Adithya" : "Jai"}'; // Convert the JSON to an associative array $someArray = json_decode($someJSON, true); // Read the elements of the associative array foreach($someArray ...
Find elsewhere
๐ŸŒ
MDN Web Docs
developer.mozilla.org โ€บ en-US โ€บ docs โ€บ Web โ€บ JavaScript โ€บ Reference โ€บ Global_Objects โ€บ JSON โ€บ parse
JSON.parse() - JavaScript - MDN Web Docs
Because JSON has no syntax space for annotating type metadata, in order to revive values that are not plain objects, you have to consider one of the following: Serialize the entire object to a string and prefix it with a type tag. "Guess" based on the structure of the data (for example, an ...
๐ŸŒ
JSON Formatter
jsonformatter.org
Best JSON Formatter and JSON Validator: Online JSON Formatter
Online JSON Formatter / Beautifier and JSON Validator will format JSON data, and helps to validate, convert JSON to XML, JSON to CSV. Save and Share JSON
๐ŸŒ
ReqBin
reqbin.com โ€บ code โ€บ php โ€บ zg4d50d8 โ€บ php-json-decode-example
How do I decode JSON in PHP?
July 7, 2023 - If the JSON cannot be decoded or the nesting depth of the data is greater than the recursion limit, the decode function will return NULL. To encode PHP objects to JSON, you can use the json_encode($value) function. In this PHP Decode JSON example, we use the json_decode() function to convert ...
๐ŸŒ
ZIO
zio.dev โ€บ encoding and decoding json data
Tutorial: How to Encode and Decode JSON Data? | ZIO
If we provide an instance of JsonDecoder and JsonEncoder for a type A, we can encode and decode JSON data of that type.
๐ŸŒ
Tutorial Republic
tutorialrepublic.com โ€บ php-tutorial โ€บ php-json-parsing.php
How to Encode and Decode JSON Data in PHP - Tutorial Republic
These functions are json_encode() and json_decode(), respectively. Both functions only works with UTF-8 encoded string data. In PHP the json_encode() function is used to encode a value to JSON format. The value being encoded can be any PHP data type except a resource, like a database or file handle. The below example demonstrates how to encode a PHP associative array into a JSON object:
๐ŸŒ
Python
docs.python.org โ€บ 3 โ€บ library โ€บ json.html
JSON encoder and decoder โ€” Python 3.14.3 documentation
1 month ago - parse_float (callable | None) โ€“ If set, a function that is called with the string of every JSON float to be decoded. If None (the default), it is equivalent to float(num_str). This can be used to parse JSON floats into custom datatypes, for example decimal.Decimal.
๐ŸŒ
FlatCoding
flatcoding.com โ€บ home โ€บ php json handling with json_encode & json_decode
PHP JSON Handling with json_encode & json_decode - FlatCoding
April 15, 2025 - If you prefer to work with objects rather than arrays, just omit the true parameter, and json_decode() will return a PHP object: Here is another example of decoding JSON to an object:
๐ŸŒ
BitDegree
bitdegree.org โ€บ learn โ€บ best-code-editor โ€บ php-json-decode-example-8
PHP json_decode: Example of Using the HTTP POST method
obj = { "table":"customers", "limit":10 }; dbParam = JSON.stringify(obj); xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (this.readyState == 4 && this.status == 200) { newObj = JSON.parse(this.responseText); for (x in newObj) { txt += newObj[x].name + "<br>"; } document.getElementById("JSON").innerHTML = txt; } }; xmlhttp.open("POST", "JSON.php", true); xmlhttp.setRequestHeader("Content-type", "application/learn-encoded"); xmlhttp.send("x=" + dbParam);
๐ŸŒ
Lianja
lianja.com โ€บ doc โ€บ index.php โ€บ JSON_DECODE()
JSON DECODE() - Lianjapedia
myobj = json_decode('{"Name":"Barry", "Company":"Lianja", "Items":["One", "two"]}') ? myobj ? myobj.name ? myobj.company ? myobj.items[1] ?