hi, guys
thanks for looking
my problem is that i cant seem to get jquery to display my generated data.
here is my JSON output
("posts":[{"id":"1-2","time":"0","name":"dash","avatar":"http:\/\/www.gravatar.com\/avatar\/9ff30cc2646099e31a4ee4c0376091b0?s=182&d=identicon&r=PG","comment":"rtetretrete tet rt uh utert"},{"id":"2-2","time":...
I understand concepts of JSON ok, but after starting to use ebay's api, I came across a notation which I've not seen before, and was wondering if anyone could explain what's going on with it?
{
"findItemsByKeywordsResponse": [
{
"ack": [
"Success"
],
"version": [
"1.5.0"
],
...
Hi,
I'm using Jersey (jax-rs), to build a REST rich application.
Everything is great, but I really don't understand how to set in JSON Marshalling and Unmarshalling converting option for dates and numbers.
I have a User class:
@XmlRootElement
public class User {
private String username;
private String password;
private jav...
I would like to serialize a Java HashMap to string representation. The HashMap will contains only primitive values like string and integer. After that this string will be stored to db. How to restore back the HashMap?
Is it make sense to use BeanUtils and interface Converter or use JSON?
For example:
List list = new ArrayList();
...
I've just upgraded a VS 2008 project to VS 2010, converting the project but keeping the target as .NET 3.5 (SP1 is installed). My project worked without issue under VS 2008 on another machine.
I've added references to System.Web.Extensions.dll but I'm still getting the following errors from code in the App_Code folder:
1) Cannot find S...
Hi;
Can you suggest a way or a framework or etc. for JEE in order to make simple HTTP GET/POST calls to some web services like in SOAP web services but transport format must be JSON; not XML and there must not be any wrapper around(may be some vey lightweight header) like SOAP etc.
In short, my purpose is to serve web services using JSO...
Hello.
I have something like this:
function cat_filter() {
$.ajax({
type: "POST",
url: 'json/cat_filter.aspx',
data: "catId=" + "&styleId=" + "&colourId=" + "&sizeId=" + "&minPrice=" + "&maxPrice=",
dataType: "json",
beforeSend: function () {
//load loading cursor
}, succe...
Hi,
I want to fetch json script and write it to a txt file undecoded, exactly how it was originally. I do have a script that I use that I am modifying but unsure what to commands to use. This script decodes, which is what I want to advoid.
//Get Age
list($bstat,$bage,$bdata) = explode("\t",check_file('./advise/roadsnow.txt',60*2+15))...
Hi.
I'm developing a simple application for Blackberry and i'm using Google's gson to retrieve some data from a server.
The UI was working fine but when I added the gson part it started failing, it wont run.
When I run the application in the simulator it show this error: "Uncaught: RuntimeException" on that annoying white screen of de...
I created a WCF SOAP service using VS 2008 that works server side. I tacked on the code below to call the same service/contract client side using jQuery/json (no ASP.NET scriptmanager). When I put the service url into the browser, I get the correct service page and when I invoke the service from javascript and trace via Firebug, I get ...
I am trying to setup my fullCalendar event sources.
instead of pulling all of my events through 1 source, I would like to use multiple sources (ie: google, and local json)
Here is what I have so far (In short):
eventSources:
[
//CA HOLIDAYS
$.fullCalendar.gcalFeed('http://www.google.com/calendar/feeds/en.canadian%23holiday%40group.v....
Ok Im building AN API but also wanting to have that API used by my own Application.
I am pondering WCF, LinQ and JSON for my Webservices and Data and Silverlight for my application.
I have a few questions.
1) would you recommend XML over JSON or Json over XML?
a) is Json going to transfer and deserialize faster natively or is XML g...
I'm using PHP to return a json_encode()'d array for use in my Javascript code. It's being returned as:
{"parent1[]":["child1","child2","child2"],"parent2[]":["child1"]}
By using the following code, I am able to access parent2 > child1
$.getJSON('myfile.php', function(data)
{
for (var key in data)
{
alert(data[key]);
}
...
I am using Jquery in my J2EE application. I am still using XML to get pass and get the data from the server. My client side code is very vague to see. Is it better to move from XML to JSON ?
...
I have a json string in an action of MVC controller. I want to send it to view as a JSON object. How can I solve this?
public JsonResult Json()
{
... some code here ...
string jsonString = "{\"Success\":true, \"Msg\":null}";
// what should I do instead of assigning jsonString to Data.
return new JsonResult() { Data = js...
I have a really simple rest web service returning a list of questions. This code works as expected when the number of questions returned are greater than zero. But if the server returns an empty json array like [], JAXB creates a list with one question instance where all fields are set to null!
I'm new to both Jersey and JAXB so I don'...
Hi,
yet again thanks for looking.
i like to call a function (eg. comment_disp, post_disp or any other i create later on).
i have created a json function with url, fname and id can i use fname as a function name?
// on document ready runs
json('comments.php','comment_disp');
url = url to get
fname = function
name id = post o...
I have been thinking about this.
I am aware you can use json_encode(); to send an encoded array or multi-dimensional array via the jquery ajax call which will interpret the json array for you.
However I am not aware of any other techniques to send more than just a string using echo, print or return from PHP to the jQuery script?
Can so...
When making an ajax call, when contentType is set to application/json instead of the default x-www-form-urlencoded, server side (in PHP) can't get the post parameters.
in the following working example, if I set the contentType to "application/json" in the ajax request, PHP $_POST would be empty. why does this happen? How can I handle a ...
I have the following code
jQuery.getJSON(encodeURI(strUrl), {address:address,state:state, zip:zip},function(data){
alert('HELLO World!');
});
If for some reason the strUrl returns a string that's not in JSON format the callback function never gets called. Is there a way to know if the response is in json format or if something we...