I'm creating a general purpose web service that is likely to have a number of different clients, some of which I cannot anticipate at this time.
I already have a nice Java Services API and am looking to provide a web services facade on top of that.
There are great arguments on both sides of the SOAP vs REST debate and it leaves me wond...
function symbol_handler(){
fp.getForm().submit({
url:'/index.php/ajax/test_function',
success:function(resp){
//how would i access attributes of the json object?
}
});
edit: here is the php controller, in case it is relevant.
function test_function(){
$array = array(
'success' => 'true',
'msg' =>...
Hi,
I am facing issue with the following Json reponse object in the javascript eval function;Getting java script error expected }
because of special characters Tamás and Török
{[{"userFirstNm":"Naresh","userAsscId":"70336","userLastNm":"Yashwantrao","userLanId":"a70336"},{"userFirstNm":"Tamás","userAsscId":"37732","userLastNm":"Török"...
Hi all,
I have successfully returned data from a ASP.Net webservice in JSON format (using a service method that required no parameters) but have struggled with making a webservice call that requires a parameter.
Webservice:
<WebMethod()> _
<ScriptMethod(ResponseFormat:=ResponseFormat.Json, UseHttpGet:=True)> _
Public Function TestWebS...
Hi, I have a beginner level Json question with MVC.net (I've never really used jquery or json) so please excuse me if I ask something stupid.
I have a javascript file with the below
<script>
function refreshMovies() {
//$.getJSON("/Home/Refresh", showMovies);
$.ajax({
type: "POST",
contentTyp...
This is my JSON String which is generated using Java:
[{\"userFirstNm\":\"Tamás\",\"userAsscId\":\"37732\",\"userLastNm\":\"Török\",\"userLanId\":\"a37732\"}]
Using an alert in JavaScript displays boxes inside string and breaks my eval function.
Please find details in attached screen shot.
...
I use jquery ajax method, set datatype json, I get a jsonp response from a cross-domain server. But what i want is raw string of json response. so i set datatype text, but i got nothing but a empty string.
$.ajax({
url:"http://api.douban.com/book/subject/isbn/9787802057388?alt=xd&callback=?",
dataType:'text',
...
I am using PHP as server side coding, and i want a set of values to be send to the server(in array format). how can i send that, and retrieve that array value at backend?
...
I'm using this blog post as a guide, detailing how to use jQuery with jTemplates to stuff a JSON response into a template.
My problem is, one of the returned fields (named Description) contains HTML, but the HTML brackets are getting encoded to \u003C and \u003e.
Here's the HTML (in the Description field) the server returns:
<a href="...
Here is my Javascript:
$.post('foo.php', { request: Request }, function(data)
{
$.each(data.chats, function(i, chat)
{ ... });
});
And here is the JSON that, verified by Firebug and everything else, this code is receiving:
{
"chats": [
{
"chat_id": "22",
"user_status": "Listening",
...
Hi,
I have the following JSON object which has a date field in the following format:
{
"AlertDate": "\/Date(1277334000000+0100)\/",
"Progress": 1,
"ReviewPeriod": 12
}
I want to write a regular expression or a function to convert it to a javascript object so that it is in the form:
{
"AlertDate": "AlertDate":new Dat...
Hi,
I would like to do a global replace on a string like this:
var d = "{\"AlertDate\": \"\/Date(1277334000000+0100)\/\",\"Progress\": 1,\"ReviewPeriod\": 12}";
and replace all the \/Date(1234656000000+0100)\/ fields with the following:
"{\"AlertDate\": \"new Date(1234656000000+0100)",\"Progress\": 1,\"ReviewPeriod\": 12}";
How co...
I am currently using edit_area_full.js on a few web pages to format python code examples. I have a few cases where I want to pretty format json data, but edit_area does not support json. What is the best drop in replacement for edit_area that can format json data in a text box in a webpage?
Here is how I am formatting python code.
<p>...
I have a client's JSON files that he got from the NING exporter. I'm trying to load the data into PHP but seems like the json isnt properly formatted or something. SO PHP is not able to parse the JSON. I also used another PHP class to do it but that did not work either. Below is the content of one of the files
([{"id":"2492571:Note:7...
I have a .NET webservice that is returns JSON.
The client-side developer now wants to send his request in GET method, putting the parameters in the querystirng.
I have enabled the GET verb in my web.config file, I have added UseHttpGet=true in the ScriptMethod attribute, and now I am able to recive the parameters.
BUT when he ca...
I am having a problem with JQuery Galleria and the support person there said it's a bug and to fix it I have to put my images into a JSON var data object in my Javascript.
Unfortunately for me, I have no experience doing this and their information is not very clear. On their website support they show the following code as an example:
v...
Hi all,
I'm trying to convert a domain class into JSON.
def converter = null
try{
converter = events as JSON
} catch(e) {
log.error "error during conversion to JSON"
log.error e
}
return converter.toString()
I always get this error:
org.codehaus.groovy.grails.web.servlet.mvc.exceptions.ControllerExecutionException: Executin...
I'm trying to read a JSON object which contains the date/time in a format that cannot be directly parsed by .NET's DateTime structure. In order to avoid having an 'int' field in my structure for the date/time, I wrote a custom DateTimeConverter:
public class DateTimeConverter : JavaScriptConverter {
public override IEnumerable<Type> S...
Is there a standard or specification which defines json file extensions?
I've seen .json used - is this just a commonly accepted practice or is it a requirement of some standards body for json saved in file format?
...
I'm relatively new to java and android development so sorry if this is a silly question. I'm building simple app, simply to learn the android ropes, that will display a list of the most recent photos uploaded to flickr. The app is constructed but it's crapping out when it tries to deserialize the json that I get back from flickr. Here is...