I am learning AJAX in zend framework step by step. I use this question as first step and accepted answer in this question is working for me. Now I want to load more than one DIVs using JSON. Here is my plan.
IndexController.php:
class IndexController extends Zend_Controller_Action {
public function indexAction() { }
public fu...
Hi,
I have a json output array like this
{
"data": [
{
"name": "Ben Thorpe",
"id": "XXXXXXXXXXX"
},
{
"name": "Francis David",
"id": "XXXXXXXXXXX"
},
}
I want to loop through it and print out the all the names using javascript. I want to be able to do this.
for(i=0;i<le...
I've got a DomainService that I've created from an entity framework that's being exposed via a JSON endpoint. I can successfully do GET operations but whenever I try to POST to them using JSON the objects are always null.
The code below is used to create a user record in my database:
[Invoke]
public void CreateUser(User NewUser)
...
Hi,
I have a json output that looks like this..
{
"XXXX": {
"name": "Dalvin Nieger",
"work": [
{
"department": {
"name": "Sales"
},
"start_date": "0000-00"
}
],
"link": "http://www.my-site.com/profile.php?id=XXXXX",
"id": "XXXXXX"
}...
I'm working with Facebook API and it's search method returns a JSON response like this:
{
"data": [
{
"id": "1",
"message": "Heck of a babysitter...",
"name": "Baby eating a watermelon",
"type": "video"
},
{
"id": "2",
"message": "Great Produce Deals",
"...
Hi,
I have a json output that looks like this.
{
"38467": {
"name": "Tony Parker",
"book": [
{
"title": {
"name": "MediaWorks"
},
},
],
}
"59678": {
"name": "Ray Thomas",
}
}
Actually json output is a lot bigger list. But I want to only save...
Short and sweet:
Is there a way to specify the order of fields in a serialized JSON object using JSON.NET?
It would be sufficient to specify that a single field always appear first.
...
I'm trying to pass Json to my View using ViewData
Controller
ViewData("JsonRegionList") = Json(RegionService.GetActiveRegions())
view
$("input#UserRegion").autocomplete({
source:"<%: ViewData("JsonRegionList").ToString %>",
minLength: 3,
but the problem I'm running into is the output source ...
How do I retrieve the n-th value in a JSON file (and maybe it's children, too)?
For example, I have a collection of courses and associated events formatted in JSON, which I'm using to populate a couple of select lists, e.g:
// extract from courselist.php
[{
"optionValue": "Getting Research into Practice",
"events": [
{"...
I am using plupload to perform multipart file uploads. On success, it returns the serverdata that was stored. But i am receiving a string instead of an object containing all my attributes.
This is my controller action:
def upload
@user = User.create! :name => params[:photo_name], :swf_uploaded_data => params[:photo]
re...
I have a strange problem in json date parsing. I am using the following to parse the json date:
dateFormat(new Date(parseInt(user.RegDate.substr(6))), "mm/dd/yyyy")
When my local machine (Client) is in different timezone from the server timezone, then it returns different dates when i try to retrieve the registered date of the users. ...
Why am I getting an error in my json use in ie6 and ie7, but no other browser?
I'm parsing with:
$.getJSON('http://www.brettbarros.com/wordpress/?post_type=projects&json=get_post&include=title,content,attachments&post_id=8', function(data) {
alert(data);
});
I'm parsing a json feed from the wordpress plugin JSON API:
...
Hi guys I want to speed up my ajax requests, I'm returning large amounts of information from the requests and was wondering if any sort of compression could be applied here to speed things up a bit.
My ajax requests typically all send in JSON encoded objects such as objects and arrays which contain html elements and other stuff at time...
Is there a way in htaccess to ensure the headers for my json are correct?
Update: Does anyone see anything wrong with these headers for json?
Date Mon, 26 Jul 2010 08:31:11 GMT
Server Apache/2.2.15 (Unix) mod_ssl/2.2.15 OpenSSL/0.9.7a mod_fcgid/2.3.5 Phusion_Passenger/2.2.15 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0....
I am playing around with Objective-C and have been looking for a good how-to example to exchange data it and PHP. JSON? SOAP? If anyone knows of a well written example I could hack at, I would appreciate it.
...
Is there a quick function to covert json objects received via jQuery getJSON to a string variable dump (for tracing/debuggin purposes)?
...
Web app. Get data from services in json & xml formats. And from internal module in hash.
Decided to choose one format for all stored data.
details :
More read than write.
Data low nested (< 10).
Char count between 1000 - 100000.
Programming language - ruby.
Framework rails.
DB mysql.
What's your recommendation?
...
JSON and XML are both frequently called to be context-free languages - they are both specified mainly by a formal grammar in EBNF. However this is only true for JSON as defined in RFC 4329, section 2.2 which does not require uniqueness of object keys (many may not know but {"a":1,"a":2} is valid JSON!). But if you require unique keys in ...
I'm looking for a tool that'd let me embed json-formatted information inside a PNG -file.
This far it's been quite quiet. Do I have to write it myself?
I'd be especially interested of doing it with javascript. Into an image I extract from a canvas with toDataURL -method.
...
I'm working on MVC project and i using jQuery in view page to get data from controller.
public JsonResult CheckUpdate()
{
dt = dt.AddSeconds(-100);
IQueryable<Tweet> _tweet = ttr.CheckTime(dt);
return Json(_tweet, JsonRequestBehavior.AllowGet);
}
This is a method in my controller which gets data back from the repository class ...