I have a problem with a simple VS2010 .NET 4.0 MVC2 application.
My controller action looks like this:
public JsonResult GetJson(string query)
I access the action with jQuery like so:
function getJson() {
var postdata = {};
postdata['query'] = $('#query').val();
$.ajax({
type: "POST",
url: '<%= Url.Acti...
Hi, I'm trying to send array of data from Flash to PHP to sending e-mail. I'd like to do that because I must change the php page everytime my form site changes because of client's choice.
My answer is, can I send an array of objects like this to php?
var message:Array = new Array ();
message.push ({field_name:"Name", value:"John Lennon...
I'm trying to create a JSON object on client-side and pass to a server-side function. Then instantiate it on server-side using JSON string representation.
So I create jSON object on client-side
var myJsonObject = {
"arg1": var1,
"arg2": var2
}
and pass it in to
WebForm_DoCallback(controlID, myJsonObject , n...
A friend wants to consume my ASP.NET MVC 2 application in a similar fashion as adding a web reference to it, accessing my functions, and using my model objects from a .Net web form from a separate website.
Any links out there that could explain how to "dress" my MVC responses so that his server to server consumption would be similar in ...
I'm getting an error when trying to open a website url with Python 3.1, urllib & json
urllib.error.URLError:
Here's the code. The first website loads fine. The second one
import json
import urllib.request
import urllib.parse
import util
# This one works fine
response = urllib.request.urlopen('http://python.org/')
html = response....
I added a click event to all elements on the page and now want to send the clicked target element to a server.
If the clicked element has an ID, then I can just send the ID, but if the element doesn't have an ID, class, name, ... , then how can I send an identifier (or selector) to the server which points to this exact element?
I tried ...
I'm retreiving a JSON string and parsing it with jQuery with $.getJSON.
After I get the data in a variable, can I add or remove rows? An example:
{"one": [{"sid":"1","name":"NAME 1"},{"sid":"2","name":"NAME 2"}],
"two": [{"sid":"3","name":"NAME 3"}]}
Can I delete sid 1 from "one" and place it in "two"? How about sorting by sid? I'm ...
How to convert datatable to json using json.net? Any suggestion... I ve downloaded the necessary binaries... Which class should i use to get the conversion of my datatable to json?
Thus far used this method to get json string by passing my datatable...
public string GetJSONString(DataTable table)
{
StringBuilder headStrBuild...
I need a basic JSON parser that works with J2ME / CLDC 1.1.
A Google search returns tons of answers on this (some even on stackoverflow), but it appears that all point to libraries and solutions that are no longer available (for example, lots point to an implementation that is supposed to be on the json.org site, but at least I can't fi...
I am trying to convert java object to JSON object in Tomcat/jersey using Jackson. And want to suppress serialization(write) of certain properties dynamically.
I can use JsonIgnore, but I want to make the ignore decision at runtime. Any ideas??
So as an example below, I want to suppress "id" field when i serialize the User object to JSO...
We're currently developing a site that uses a simple JSON API (RoR) to populate the page. The data is public to clients but key to our service and we want to make sure that our competitors aren't leeching our data. What methods do you use to verify that AJAX requests to an API are legitimate?
...
dynamictextareas.push({guideid:targeteditorID, guideitemtext : textareacontents });
alert( JSON.stringify(dynamictextareas) );
See anything wrong with this JSON2 javascript code?
For some reason this come is making a mess of things. I want to push:
<p>DDDDDD</p>
But instead it's pushing:
[{"guideid":"1","guideitemtext":"<p>\u000a...
I want to imitate Google suggest with the following code, which means:
step 1: When user types in search box, the query string will be processed by a server php file and query suggestion string is returned(using Ajax object).
step 2:When user clicks on a query suggestion, it will fill into the search box (autocomplete).
Step 1 is a...
I'm currently working on a webservice-client for Android. I'm using a Java client library which provides an abstraction for interaction with the service. The client library works on normal machines. However, when I use the classes in my Android project, some calls don't return a result on Android, the background-service stops working at ...
I'm just starting to learn JSP (and I'm pretty new to Java in general), and I'd like to use JSON-lib with it. I want to make a page something like this:
<%@ page import="net.sf.json.JSONObject"%>
<%
String json = new JSONObject().put("hello", "world").toString();
out.println(json);
%>
I downloaded json-lib-2.3-jdk15.jar and put it in ...
Hi,
My problem is manage the code which get the tag and use is as variable (var searchterm= ??????). With JSON I want first get the "location" tags with tagthe and show the relate photos from flickr.
<!DOCTYPE html>
<html>
<head>
<style>img{ height: 100px; float: left; }</style>
<script src="http://code.jquery.com/jquery-latest.mi...
In the json site, the number and string diagrams are book-ended by double bars.
What do the double bars mean?
...
hi, I have json data like this:
{"Adobe Photoshop":"70","Adobe Premier":"71","Animasyon":"72","AutoCAD":"73","Bro\u015f\u00fcr & Bilet":"75","CorelDraw":"76","Flash":"77","Grafik Tasar\u0131m":"68","Karikat\u00fcr":"78","Kartvizit Tasar\u0131m":"79","Logo Tasar\u0131m":"80","Poster":"81","Reklam Tasar\u0131m":"74","Ses D\u00fczenleme":"...
My understanding is that in order to return a complex PHP variable to Javascript, it should be done via AJAX and json_encode. Could somebody give me an actual example (both PHP and Javascript code) of this? Lets say we have the two-dim array in PHP:
$twoDArr = array( array('Greg', 44, 'Owner'),
array('Joe', 23, 'Rent...
I'm new in gwt and new to using Firebug. MY gwt version is 2.0.0. using eclipse and WAMP. my IIS is stoped to run WAMP apache. I run my program on firefox
I have valid json result from tesdb3.php located in "http://localhost/phpmyadmin/tesdb3/datauser.php"
{"item": [{"kode":"002","nama":"bambang gentolet"},
{"kode":"012","nama...