Tagged Questions
0
votes
3answers
46 views
Using json_decode to retrieve ajax-sent javascript array for email
I'm trying to email the contents of a JS array by encoding using JSON.stringify and then decoding in the PHP which should then be sent via email. I get a success alert that the data is sent to the PHP ...
1
vote
4answers
51 views
The correct json format for this? [closed]
{
"categories": [
{
"necklaces": [
{ title: "Outlet", url: "W_Outlet" },
{ title: "Baby-G", url: "W_BabyG" },
{ title: "Bulova", ...
0
votes
0answers
67 views
Parsing Json array in sencha touch 2
How to parse this json [{"message":"Session expired or invalid","errorCode":"INVALID_SESSION_ID"}] in sencha touch 2.
Since this is a json with array, I am not able to parse this using ...
0
votes
3answers
322 views
Saving JSON data to database
Picked up knockout.js and I'm trying to save data to a mysql database using PHP(Laravel framework to be more specific). Here is the ajax:
$.ajax("save", {
data: ko.toJSON(this), // turns the input ...
0
votes
1answer
110 views
how to use JSON.stringify and json_decode() properly
Im trying to pass a mulitidimensional Javascript array to another page on my site by:
using JSON.stringify on the array
assigning the resultant value to an input field
posting that field to the ...
1
vote
1answer
156 views
How to execute json decode in live server?
I am currently working in google map API.In google map API, i am fetching longitude and latitude from specific address.
Here is the code:
...
0
votes
1answer
222 views
How can I retrieve json stringified objects in php?
I sent some data to the server using the code snippet below, but I do not know how to retrieve the returned array using PHP. Thanks for any suggestion.
$('.ticket-row').each(function() {
...
0
votes
3answers
82 views
json decode in php problems
I have the fallowing string in php:
$code = "[[],["Mon","01"," 1.7"," 8","3"," 96","33","
29.01.2013"],["Tue","01"," 0.3"," 24","2","100","16","
30.01.2013"],["Wed","01"," 5.4"," 28","2"," ...
1
vote
1answer
47 views
Cant get value from json in javascript
I have a function in JavaScript:
function login() {
user=document.getElementById("user_id").value;
pass=document.getElementById("password").value;
params="user="+user+"&pass="+pass;
...
0
votes
1answer
835 views
Javascript JSON.parse responseText “Unexpected end of input”
I keep getting "Uncaught SyntaxError: Unexpected end of input " in the browser console when running this JSON.parse. I tried shortening the $element to just $entry but still no success:
function ...
0
votes
1answer
147 views
How to correctly pass JSON from php to Javascript with Dates?
I am tinkering with the Jquery Weekly Calendar Plugin (Which you can look at the full demo here: skedyul.herokuapp.com)
Now, I'm trying to put some events dynamically using PHP but I'm fairly new to ...
1
vote
1answer
108 views
json_encode gives HTML entities. How to convert convert matching XML conventions?
I am starting to create a Samsung TV App, which runs a pretty tight system where I can barely work with more than JS and HTML5. Furthermore, I have to send a json request to my web server to get the ...
2
votes
2answers
578 views
How do I convert a string with single quotes into double for json parse
I have an array that is being encoded in php using json_encode
$params = array(1=>'something','2'=>'two');
When I encode it using json encode it will encode it with double quotes which in ...
1
vote
0answers
138 views
how to check the attributes of json string?
I have an array of JSON strings. Consider the first element of the array has 4 attributes,
{a:name,b:address,c:dob,d:country},
and the second element has only 3 attributes, it has no 'c' ...
0
votes
2answers
448 views
parse json showing undefined error
I'm parsing the json to get data but it is showing the undefined error.I'm using the following code.
JSON Data:-
[{"id":"1","name":"vikash","email":"[email protected]","phone":"98744254114"},false]
...