Hey,
I am returning a list of items (user defined class) in a REST service using WCF. I am returning the items as JSON and it is used in some client side javascript (so the 'schema' of the class was derived from what the javascript library required). The class is fairly basic, strings and a bool. The bool is optional, so if it is absent...
A client of mine would like to be able to update her site's image galleries by adding images to albums on her facebook account. Is this possible using JSON? would the albums she chose to display need to be made public? Thanks for any help on this!
...
The javascript does not get value from the web method.
It says undefined for the value of s located in CallMe()..
My aim is get an object from the web method.... to use the data in js..
What am I missing_?
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
us...
private function jsonArray($object)
{
$json = array();
if(isset($object) && !empty($object))
{
foreach($object as $obj)
{
$json[]["name"] = $obj;
}
}
return $json;
}
We are grabbing an object, and if the conditional is met, we iterate over that object.
Then... I'm lost on this reading... :s
Wh...
Hey all,
Recently I ran into a problem: Valid JSON when passed to the eval() function causes it to throw the error -- "script stack space quota is exhausted".
It is consistently reproducible, and through initial examination, it seems that this is a limitation on the number of object attributes/properties that can be defined (and not th...
This thing was not noticed to be slow at first because there were not many 'tree nodes' in the database. Now it's really slow, at a glance is there anything major that is wrong with this? I really need to optimize it and before I rework the entire thing I was wondering if anything stands out as being the real pain point. I have narrowed ...
My Servlet just won't use UTF-8 for JSON responses.
MyServlet.java:
public class MyServlet extends HttpServlet {
protected void doPost(HttpServletRequest req, HttpServletResponse res) throws Exception {
PrintWriter writer = res.getWriter();
res.setCharacterEncoding("UTF-8");
res.setContentType("application/json; charse...
I have a Struts2 Action Class configured via annotations. All of the "normal" methods that are annotated with @Action work fine.
However, I need to add a method into the action that returns JSON.
Here is a trimmed down version of my class (dao autowired with Spring):
@Namespace("featureClass")
// define success and input actions for c...
I'm absolutely digging what I've been able to do in jQuery. From my perspective there isn't a lot jQuery can't do.
I'm working on a new project and my plan is to use jQuery heavily with JSON,Ajax and Webservices inside of a ASP.net project.
Before I go spouting my opinion about how great jQuery is, I thought I might ask if there are...
I have a valid JSON dataset:
[
{
"date": "2008-02-04 19:30:00",
"authors": [
{
"first_name": "Nassim Nicholas",
"last_name": "Taleb"
}
],
"icon": "djlongnow_media/seminar_icons/salt-020080204-taleb.jpg",
"slug": "the-future-has-always...
How can I gather the data into c# from this xml?
I get the data from :http://www.ecb.europa.eu/stats/eurofxref/eurofxref-daily.xml
PS: I would like to get the currencies rates from a web service, bu I could not find a trustworthy web service, thats why I try from xml...
<?xml version="1.0" encoding="UTF-8" ?>
- <gesmes:Envelope x...
From my Rails 3 app i want a JSON like this:
{count:10,
pictures:[
{id:1},
... ] }
I tried
render( :json => { :count => 10, :pictures => @pictures.to_json(:only=>:id) } )
but in this case, my pictures get escaped
..."pictures":"[{\"id\":2653299}, ....
In my old merb app i had the following simple line...
I'm rather new to ios and json.
I've managed to create a db in mysql and used php to create a basic read and write php pages.
I'm using the TwitterHelper class from cs193p class for the presence assignment from Stanford to acces the php interface online and tie it to my ios code. I am getting an error which I can't solve.
Update:
O...
How to receive JSON from POST requests in CherryPy?
I've been to this page http://goo.gl/t4hI [docs.cherrypy.org], and though it does a good job explaining the API, its parameters, and what it does; I can't seem to figure out how to use them to parse the incoming JSON into an object.
Here's what I have so far:
import cherrypy
imp...
Coding Platform: ASP.NET C#
I have an XML like this.
<Items>
<Map id="35">
<Terrains>
<Item id="1" row="0" column="0"/>
<Item id="1" row="0" column="1"/>
<Item id="1" row="0" column="2"/>
<Item id="1" row="0" column="3"/>
<Item id="1" row="0" column="4"/>
...
Should I rely on http status codes? Or should I use some kind of special response?
My server is running PHP and producing simple JSON responses.
...
If you run a site that links to world of warcraft items, you're probably using the wowhead.com javascript to bring their item popups to your site. See it in action here, mouse over the "King Dred's Helm" link. It will popup Wowhead.com's info.
is this just a jsonp callback to their site?
I want to implement something like this on my si...
I know there are a few frameworks to parse JSON, but how can I generate a JSON string in Objective-C? Will it be something I would have to write myself, or is there something simple already out there?
...
I'm creating a dataTables table to use as an archive of pages for a site that produces a comic strip. On that archives page, I'd like to have the title of the comic be a link to the page of that comic strip.
Initialization:
<script type="text/javascript" charset="utf-8">
$(document).ready(function() {
$('#ex...
I'm not sure how to serialize the following example from json to a c# object. Normally, I do something like this:
JavaScriptSerializer ser = new JavaScriptSerializer();
result = ser.Deserialize<Library.Libraries.Model.Post>(responseFromServer);
But in this case, I'm not sure how to create the class to base it off since the values an...