Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 167 results for
json-decode
- Page 1
Re: Json decode help need
Programming
Web Development
11 Years Ago
by lps
This problem is actually cause by the data is not in correct format. As the data provided is in {features: {forecast10day: 1 }} format while the
json
decode
function accept {"features": {"forecast10day": 1}}
getting error in json decode
Programming
Web Development
10 Years Ago
by blueguy777
my
json
decode
script throwing error i.e. Error : DATA FETCH My code: &… array will contain your data print_r($arr_data); } else { echo "
Json
data not set !!"; } } else { echo "Error : ".$msg_text…
Json decode help need
Programming
Web Development
11 Years Ago
by arafath077
… wunderground.com weather API. I got
JSON
to an array.buy i coudlnt echo… sample code to i used in my site `$
json
= file_get_contents("http://api.wunderground.com/api/ab3f1aefcf4033d4…/forecast10day/q/CA/San_Francisco.
json
"); //$phparrya = json_decode($jsonstring); $array_json=json_decode($
json
, true); print_r($obj);`
Re: Json decode help need
Programming
Web Development
11 Years Ago
by Alberto Bucur
Hi, Try to workaround this code: <?php $
json
= file_get_contents("San_Francisco.
json
"); $array_json=json_decode($
json
, true); //print_r($array_json); display_jsonarray($array_json); function display_jsonarray…
JSON
Programming
Web Development
11 Years Ago
by davy_yg
Method saving:
JSON
on file “content.txt” Data Serving Method: 1. Get content ….txt” every page load and put in on parameter. 2.
JSON
Decode
the parameter. So the parameter will be array type. 3… CMS. Does that mean that it's not using mysql ?
JSON
by itself is enough ? What's the difference between…
Re: Json Decode
Programming
Web Development
12 Years Ago
by Danny159
Ahhh I have a
json
in a
json
will that cause issues, if so how would you resolve it?
Re: Json Decode
Programming
Web Development
12 Years Ago
by blocblue
Why would you need a
JSON
string inside another
JSON
string? Encode the entire data structure in one go.
Re: Json Decode
Programming
Web Development
12 Years Ago
by blocblue
Use `var_dump` instead. This will allow you to determine whether `json_decode` is returning `null` because the
JSON
cannot be decoded. If you're pulling the data from a database, did you add slashes or anything when inserting?
Re: JSON
Programming
Web Development
11 Years Ago
by paulkd
…. JavaScript is a scripting/programming language. The [website](http://www.
json
.org) explains it better but the format is "readable…; and lightweight. Your text shows that content.txt will contain
JSON
encoded data. You can use whatever server (PHP, ColdFusion..) or…
Re: JSON to MySQL with PHP
Programming
Web Development
13 Years Ago
by diafol
… can use json_decode: [url]http://php.net/manual/en/function.
json
-
decode
.php[/url] 1. ensure that you have ALL the possible… names in a table before you start. 2. read the
json
file into a php string variable. 3. do a json_decode…
Re: JSON , MYSQL and PHP
Programming
Web Development
10 Years Ago
by jkon
Storing a string in db from
JSON
decode
has really no meaning at all. The only case I …
Re: json to php
Programming
Web Development
9 Years Ago
by jkon
http://php.net/manual/en/function.
json
-
decode
.php
Re: Json decode help need
Programming
Web Development
11 Years Ago
by diafol
What data did you want to extract? The textforecast/forecast data array would be: $array_json['forecast']['txt_forecast']['forecastday'] For a 10 day forecast this contains 20 items - one daytime and one night for each day. It is number-indexed (0-19) The simpleforecast/forecast data array would be: $array_json['forecast']['txt_forecast…
Re: Json decode help need
Programming
Web Development
11 Years Ago
by arafath077
thanks u all..worked
Re: getting error in json decode
Programming
Web Development
10 Years Ago
by pritaeas
if($msg == "success") That's case sensitive, and should be: if ($msg == "SUCCESS") or: if (strtolower($msg) == "success")
Re: getting error in json decode
Programming
Web Development
10 Years Ago
by blueguy777
wow perfect! thanks pritaeas
Json Decode
Programming
Web Development
12 Years Ago
by Danny159
Hey guys, I am having some trouble with json_decode... I used json_encode to encode a string that is the following: {"id":"121","firm":"DSD","address":"Test","address2":"Test","city":"Test","region":"Test","postcode&…
Re: Json Decode
Programming
Web Development
12 Years Ago
by Danny159
Thanks for your reply, I added var_dunp and it returned NULL, I dont addslashes when inserting all I do it jason_encode: see below... $thedarray = json_encode($thedarray); mysql_query("INSERT INTO `changelog` (`date`,`newda`,`orig`,`status`) VALUES ('".time()."','$thedarray','$orgarray','1')");
Re: Json Decode
Programming
Web Development
12 Years Ago
by ko ko
var_dump($arraydata['newda']); How look like the above value before json_decode() function ? It contains any slash or escape ?
Re: Json Decode
Programming
Web Development
12 Years Ago
by Danny159
Its alright guys I sorted it... your right I needed to addslashes :) Thanks! Dan
Re: json to php
Programming
Web Development
9 Years Ago
by lps
Agree with @jkon, please use the json_decode() to
decode
the
json
format into array. Then from the array, manually assign them into another variable(if it really needed).
Re: Json style issue
Programming
Web Development
9 Years Ago
by lps
…php", method: "post", dataType: "
json
", data: {'ajax': true}, success:function(resp) {…]; var status = resp[i][5]; var
decode
= $('<div/>').html(status).text(); //this…;+time+"</td><td>"+
decode
+"</td></tr>"); }…
Re: Decode json file with jquery
Programming
Web Development
11 Years Ago
by Bachu
…javascript"> $(function() { $.ajax({ dataType: "
json
", url: "
json
.php", success: function (data) { for (var index…++) { alert(data[index]); } } }); }); </script> In
json
.php <?php $array = array("0","1…
Decode json file with jquery
Programming
Web Development
11 Years Ago
by kshahnazari
I have a ajax fucntion that gets a
json
array from the php , 8 numbers formed like this ["0","0","0","0","0","0","0","1"] , As I get this in a var called data , data[0] and this kind doesen't work , how can I access this numbers ?
Re: Decode json file with jquery
Programming
Web Development
11 Years Ago
by JorgeM
Try something like this... <script> $.ajax({ dataType: "
json
", url: "getJson.php", success: function (data) { for (…
Re: Decode json file with jquery
Programming
Web Development
11 Years Ago
by diafol
show your php code to see if you're echoing it out properly in
json
format
Re: Json response in javascript
Programming
Web Development
3 Months Ago
by Langflow
Hi! You can
decode
the
JSON
response in PHP by using json_decode($response, true); to get an associative array and then get the keys by using array_keys($data) and access values as needed!
Re: Json response in javascript
Programming
Web Development
3 Months Ago
by Dani
Sorry, I'm confused. Do you want to
decode
the
JSON
in PHP or in Javascript?
Re: Json response in javascript
Programming
Web Development
3 Months Ago
by Mr.M
@Dani, I wanted to
decode
it, basically @BIIM has provided something that helped me out, …
Decode Google id_token
Programming
Web Development
11 Years Ago
by Dani
… OAuth 2 login. I'm able to successfully retrieve a
JSON
array that consists of the access_token, id_token, etc. The id_token… is encrypted in what google calls a JWT (
JSON
Web Token). From what I understand, they're base 64…
1
2
3
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC