I'm using Asp.Net-Mvc, I have this method in my controller:
[AcceptVerbs(HttpVerbs.Post)]
public ActionResult LinkAccount(string site, object id)
{
return this.Json(id);
}
Here's the ajax method that calls it:
$.post("/Account/LinkAccount", { site: "Facebook",
id: FB.Faceboo...
I posted a question yesterday dealing with parsing json data. In one of the follow up answers someone said I was taking a performance hit by using the jQuery append() function within each iteration, while using each().
I was doing:
$.getJSON("http://myurl.com/json?callback=?",
function(data) {
// loop through each post
...
I'm developing a new application for the company.
The application have to exchange data from and to iPhone.
Company server side uses .NET framework.
For example: the class "Customer" (Name, Address etc..) for a specific CustomerNumber should be first downloaded from server to iphone, stored locally and then uploaded back to apply cha...
I'm using JSON to communicate some data through AJAX from the backend to the frontend (Javascript, of course). The XMLHttpRequest is done by a Prototypejs-written AJAX-handler (I'm still in the process of migrating to jQuery, but the noConflict-mode allows me to run both simultaneously), after which PHP sends the X-Json header with some ...
I have written one simple web service which get product list in JSONText which is string object
Web Service code is below
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Services;
using System.Web.Script.Services;
using System.Runtime.Serialization.Json;
using System.IO;
using System.Text;
/// <sum...
My JS saves some string data to JSON using "stringify()", but observing the outputted JSON string I see a lot of strange chars (out of keyspace), such as NULLs and other bad chars. Now I don't have a list of these "bad" chars so how can I strip them out of my string data?
...
There is not a single clear example that explains how to pull json data as simple as possible. I have a valid json and I need to retrieve it with jquery
my json output is as:
{
"title": "blog entries",
"items" : [
{
"title": "Can Members of the Diaspora Work Effectively at th",
"date": "8/4/2009 ...
I am having problems with centering the map using the panTo() method - as well as making the directions (from/to) to work like tabs.
Here is my code:
http://dpaste.com/76251/
...
I'm new to WCF (and pretty rusty with .NET in general) so there's a distinct chance this is an answered question and I just missed it.
I'm building an ASP.NET MVC app that will be using a RESTful JSON-based API for its backend. I've been looking into the different options for how to talk to such an API in .NET and it looks like WCF is t...
Are there any classes/functions available to be used for easy JSON escaping? Id rather not have to write my own.
...
I have the following result from a $getJSON call from JavaScript. How do I convert the start property to a proper date in JavaScript?
[
{"id":1,"start":"\/Date(1238540400000)\/"},
{"id":2,"start":"\/Date(1238626800000)\/"}
]
Thanks!
...
For some reason I'm getting an InvalidAuthenticityToken when making post requests to my application when using json or xml. My understanding is that rails should require an authenticity token only for html or js requests, and thus I shouldn't be encountering this error. The only solution I've found thus far is disabling protect_from_for...
I have some JSON-
[{\"crudtype\":\"Update\",\"objectid\":\"11\",\"attributes":[{\"CREATED_BY\":\"OSPLOADER\",\"x\":\"y\"}]}]
Having difficulty with getting the "attributes" out. I'm using DataContractJsonSerializer in combination with ISerializable from this example.
protected Attributes(SerializationInfo info, StreamingContext ...
I am using ASP.MVC 1 to return an IEnumerable of objects (say, Cars):
public class Car : Entity<Car>
{
public virtual string Make { get; set; }
public virtual double Length { get; set; }
public virtual string Colour { get; set; }
}
like this:
[AcceptVerbs(HttpVerbs.Post)]
public JsonResult GetRoutes()
{
IEnumerable<Ca...
I'm trying to extract the shortUrl from the Bit.ly JSON response. The problem is the original url is included in the response, using the dot notation to traverse the response doesn't work? I can get the other attributes (errorCode, errorMessage etc), but I can't get anything under results beacuse of the url.
Am I missing something?
Th...
I am having some trouble with the classic javascript local variable scope topic, but dealing with a JSON variable. I have looked at other questions here regarding the same thing, but nothing has matched my case exactly, so here goes. I have a class that I have made from javascript that has 3 methods: func1, func2, and func3. I also ha...
Main question: What operators, properties, etc. can be used to determine the type of variables in Groovy?
Background:
I have an arbitrarily deeply-nested dictionary data structure. It is the result of calling request.JSON in a Grails controller. I would first like to verify certain keys are in the dictionary, with the appropriate types...
I am creating a javascript API for SCORM 2004 4th Edition. For those who don't know about SCORM, basically it is an API standard that eLearning courses can use to communicate with an LMS (Learning Management System). Now the API has to have the following method:
Initialize(args)
GetValue(key)
SetValue(key, value)
Terminate(args)
Comm...
I'm using MIT's Simile to display thumbnails and links with faceted filtering. I works great, but large data sets (greater than 500 elements) start to slow significantly. My user base will tolerate seconds, but not 10's of seconds, and certainly not minutes while the page renders.
Is it the volume of data in the JSON structure?
Is it...
So I have a table in a jsp page with several rows and checkboxes for each row. I created a js function that creates an array of the value on the checkboxes. I want to send this array over in an ajax call so I toJson-ed it but I dont understand how actionbean variables get set with these parameters. Can anyone help? THANKS!
...