Hi folks,
i have a list of lat/long objects on my server.
eg.
public class LatitudeLongitude
{
public float Latitude;
public float Longitude;
}
simple.
now, can i return a collection of these, in json format .. BUT ... i do not want to list the key, just the values.
This means the normal result would be something like ...
...
I'm following the tutorial here
http://applicake.com/posts/54-integrating-facebook-connect-with-rails-applications
to set up facebook connect. It almost worked, except for the last step :-(
I'm getting a JSON error, inspite of installing the JSON plugin.
I did gem install json
How do I fix the problem?
Error in the view:
uninitiali...
How do I pass JSON to a RAILS application so it will created nested child objects in a has_many relationship?
Here's what I have so far:
Two model objects.
class Commute < ActiveRecord::Base
has_many :locations
accepts_nested_attributes_for :locations, :allow_destroy => true
end
class Location < ActiveRecord::Base
belongs_to :c...
Are JSON enabled WCF service secured as they carry Human readable strings
Any article on JSON enabled WCF secrity will help.(link)
...
I have a simple REST JSON API for other websites/apps to access some of my website's database (through a PHP gateway). Basically the service works like this: call example.com/fruit/orange, server returns JSON information about the orange. Here is the problem: I only want websites I permit to access this service. With a simple API key sys...
I have this object which I use as a list of objects:
var objList = new Object();
This is then serialized using JSON serialize. If there are no object added or all objects have been removed from the list and the blank objList is serialized, parsing the objList using JSON parser in IE, it will occasionally fail to evaluate the objList a...
I'm creating a JsonArray such as:
JsonArray jsonValues = new JsonArray();
for( int i = 0; i < values.Count; i++ )
{
var someSingleValue = values[i];
jsonValues.Add( string.Format( "Name: {0}", someSingleValue ) );
}
After that I'm shipping json values to my javascript in .aspx page via call:
HtmlPage.Window.Invoke("call", js...
Hi folks,
i have the following data as a string in my Action method:
string json = "[[1,2],[3,4],[5,6]]";
Simple.
When I call the Json view, it encapsulates the result in two double quotes. This stops the client side javascript from loading this result into a javascript object.
eg.
return Json(json);
result => "[[1,2],[3,4],[5,6]...
How many database systems there are that use JSON for storage or transport? I know of:
CouchDB
MongoDB
DBSlayer
I remember I saw yet another vendor in a SO user's profile. That systems was using what they called binary JSON, but I can't remember the name of the product.
Lately, it appears that more and more DB projects are looking t...
At first glance, I thought using xml data in javascript would be as simple as finding an xml-to-json library and turning my xml into a javascript object tree.
Now, however, I'm realizing that it's possible to create structures in xml that don't map directly to json.
Specifically, this:
<parentNode>
<fooNode>data1</fooNode>
<ba...
I'm exposing some resources via a simple API that returns JSON. I would like to inject the path to each of the resources so that the consumer need not construct them. Example of desired output for something like User.all.to_json:
users: [
{user: {
id: 1,
name: 'Zaphod',
url: 'http://domain.com/users/1.json'
}},
{user...
Hi,
I fetch a JSON array from a web service with touchJSON.
Which looks like this:
[{"icecream": {"title": "Banana"}}, {"icecream": {"title": "Strawberry"}}]
I'm not able to parse this into a NSDictionary, because
touchJSON doesn't support JSON arrays.
How do I get my JSON array into a NSDicitionary?
Regards
...
So far, this is the story of a failure, and any advice is welcome. I tried the following:
XMLStreamReader to Document using JAXP with Saxon
The code:
JSONObject obj = new JSONObject("{\"alice\":{\"bob\": \"a\"}}");
AbstractXMLStreamReader reader = new MappedXMLStreamReader(obj);
StAXSource source = new StAXSource(reader);
Document do...
I am serializing to a json object using:
public static string ToJson(this object obj)
{
JavaScriptSerializer jsonSerializer = new JavaScriptSerializer();
return jsonSerializer.Serialize(obj);
}
However when I'm populating a hidden field, I'm getting the slashes with it:
"[{\"ImageLink\":\"\",\"ShowOnHomePage\":null,\"Type\...
I have a web application that pulls data from my newly created JSON api.
My static HTML pages dynamically calls the JSON api via JavaScript from the static HTML page.
How do I restrict access to my JSON api so that only I (my website) can call from it?
In case it helps, my api is something like: http://example.com/json/?var1=x&var...
is there some way to convert json to xml in PHP? I know that xml to json is very much possible.
...
I'm using JQuery to load controls dynamically in an ASP.NET development environment using JSON and WebServices. Within this solution I have a business logic layer which has a built in validation mechanism (i.e. validating properties and business rules similar to that of CSLA)
When requesting a new control to be loaded dynamically using ...
I have been looking at JSONPath and though it seems pretty well done, I wonder if anyone has worked with it and can comment on its usability, or can recommend alternatives? What would be really slick is if there was a plugin for JQuery that did something like this. I have been searching the plugins and coming up empty handed. Anyway, ...
I've been banging my head against the wall for the past couple of hours, here's what we're trying to do: a method expects a primitive/simple type as the request body. Originally we tried with a boolean, but that didn't work so we tried with string and object. Same thing.
Here's the server-side code
[OperationContract]
[WebInvoke(UriTem...
I'm having some issues with an asp.net implementation of this JQuery facebook style autocomplete.
Basically the json url I am using is an aspx page that takes some paramaters via the query string and writes json to the response. This appears to be functioning correctly however the plugin doesnt recognise it.
The strange thing is when ...