I understand that if you use SUN's Jersey REST implementation framework, you get the ability to use XML and JSON doc's interchangably. I've tried this in a simple REST service and it works just fine, marshalling XML or JSON to Java objects and back again without any problems.
My Question is this.....
Whats the simplest 'NoSQL' way to p...
For some reason the following JSON string creates the correct number of records in the custom objects array, but does NOT populate the objects in the array with and values. Help appreciated!
JSON String
{
"Grids": [{ "CommitImporterGrid": {"CostDivisionCode": "DL", "CostDivisionKey": 5, "CostDivisionName": "Direct Labor", "SourceType...
I want to build a plugin for piwik which can plot graphs by reading a json file. I want to bypass the whole process of having to acess a mysql database, is there an easy way that I could achieve this. Also I want to build a UI with standard things such as checkboxes, textfields etc, can I do that using piwik
...
I'm trying to create an iphone app which grabs a JSON string, parses it and displays a list of items in at table view.
I'm also attempting to use an Model-View-Controller (MVC) architecture for my project.
My question is in 2 parts:
1) How do I structure my different files to conform to this standard (MVC) ?
2) (more general) I've be...
Here's where I've been:
I made a PHP client call via soap to retrieve an array of data,
I successfully receieved and converted my array to JSON via json_encode,
I then echoed it back to my page.
Here's where I am:
I get back my array in this format...
{"MethodName":"ID,11|1|Item1,22|2|Item2,33|3|Item3"}
Here's where I want to be:
Using...
Hi,
I aam trying to GET an array from a JSON file using JQuery's ajax methods. Specifically, I want to make the ajax request on document load and use the acquired data in other functions.
Here is my code:
$(document).ready(function() {
getJSON();
clickEvents();
});
function getJSON() {
$.getJSON('goods.js', function(data) {
cra...
How would I loop through this correctly?
{names:['oscar','bill','brad'],ages:['20','25','18']}
So i'd basically get the output:
names: oscar
ages: 20
names: bill
ages: 25
names: brad
ages: 18
Yes I know its a for...in loop but I just can't figure out how to get this output.
...
Hi Everyone,
While dealing with JSON returned from YQL, I found myself looking for a way extract all unique values from an array.
function uniqueArrayValues(o){
var items = o.query.results.row,
output = [];
function check(val){
for(var c=0; c<output.length; c++){
if(output[c] === val){
return fals...
Hi,
I have a bog standard html page.
All I want to do is :
use JQuery on that page to send JSON requests to a WCF service
retrieve JSON back.
That's it.
I have the html page and JQuery written, no problem.
However, I can't find one tutorial that works. All the ones I've found have many conflicting parts to do with behaviors...
<?php
$handle = fopen("https://graph.facebook.com/[email protected]&type=user&access_token=2227472222|2.mLWDqcUsekDYK_FQQXYnHw__.3600.1279803900-100001310000000|YxS1eGhjx2rpNYzzzzzzzLrfb5hMc.", "rb");
$json = stream_get_contents($handle);
fclose($handle);
echo $json;
$obj = json_decode($json);
print $obj->{'id'};
?...
I'm trying to find information on how to serialize a JSON object to query string format, but all my searches are drowning in results on how to go the other way (string/form/whatever to JSON).
I have
{ one: 'first', two: 'second' }
and I want
?one=first&two=second
Is there a good way to do this? I don't mind plugins or whatnots - i...
I am trying to generate the list of column names and the column model on the server and feed it to JqGrid.
I have successfully generated the JSON and passed it to the client over XHR, no complaints there. But, the grid itself doesn't show up. I see one column of the grid with the grid's fold/unfold button at the top.
Here is the javascr...
Can anyone serialize a Queue using the DataContractJsonSerializer in Silverlight 4.0 ? Here is some example code that throws. If not what additional collections can not be serialized using the Json Serializer ?
public String Serialize()
{
String jsonString = String.Empty;
using (MemoryStream s = new MemoryStream(...
tl:dr version:
Is there a way to get the panels to render as divs when rendered by RenderControl?
Background:
I am working on an asp.net 1.1 site, and I am trying to render a control containing panels to a string so I can pass it back to the page as JSON and refresh part of the page.
I am rendering the control thusly:
StringWriter t...
Hi all,
I have a User table in my Postgres database. In my application, the User can have various allowed websites. My question is: which is more disk space efficent, having a many-to-many relationship between a user and a url or storing the array in JSON in a column in the User table. Essintially, how much space does postgres use to st...
I'm trying to iterate through some JSON results from the YQL geo.places table using the YQL jQuery plugin (http://plugins.jquery.com/project/jquery-yql) troubleshooting with the following code;
$.yql("select * from geo.places where text=#{placename}", {
placename: '90210'
},
function(data) {
var Results = data...
Hi
I am sending serialized objects via a NetWorkStream to another computer, on the receiving end I would like to deserialize these objects.
I will be sending many consecutive objects, when I am receiving data via the NetworkStream, how do I know when the first JSON Document ended in order to have JSON.NET Parse the document from the re...
I'm trying to use the google translate api's to... well translate some text, but its behaving strangely. When my query (the text to be translated) contains no spaces, it works fine, however as soon as I introduce a space into the query, i get no results back. This is my code:
-(void)translateText:(NSString *)originalText {
//Constru...
I'm writing some AJAX; the server returns JSON (that I also wrote, and as such is sanitary JSON). Under these conditions it seems I can use eval just fine, however I worry that there may be some sort of man in the middle attack on my clients, substituting their JSON for mine. I suppose if there is a man in the middle, they can just as ea...
I have large json data which is contains hundreds thousands elements, now i need to get the ordinal position of an item inside the data with php. what is the best approach to do this rather than having loop because performance is important in this case.
Seems PHPLINQ looks promising but performance not so good.
Thanks in advanced
...