json

Need help using json-framework on iPhone

So I've got json-framework up and running on my project, but need help figuring out how to use it to parse this json string: [ { "id":"0", "name":"name", "info":"This is info", "tags":[ { "id":"36", "tag":"test tag" }, { "id":"37", "tag":" tag 2" } ], "other":"nil" }, { "id":"1", "name":"name", "info":"This is info", "tags":[ { "id":"36...

adding property to eventObject in FullCalendar

I use the json events property of FullCalendar to call a php script which returns a JSON string. The string has the required properties plus some extras like 'description'. The documenation says that you can add properties but there is no information on how to do it. I looked to see if it gets added automatically by looking at 'even...

C# native serialize/de-serialize JSON data???

It is any class in .NET 4.0 to serialize/de-serialize JSON data?? I find some 3rd party like JSON.NET, but want to know it is exist in .NET 4.0. I find in MSDN, it introduce using Data Contracts to do, but it is for WCF, not WinForm/WPF ...

Building JSON server-side with Google Web Toolkit

Google Web Toolkit has a JSON library (com.google.gwt.json.client). The 'client' part of that name makes me suspect that it isn't intended for use server-side. The following code in a server-side RPC method confirms my suspicions: System.out.println("attempting to make JSONArray"); JSONArray test = new JSONArray(); System.out.println("M...

How to detect JSON object/JSON Array on XCode using JSON-Framework

Hello all, I have some problem with JSON parsing. When I hit URL, I've got JSON response like this: //JSON 1 { "data": {"array": ["3", {"array": [ {"id":"1","message":"Hello","sender":"inot"}, {"id":"2","message":"World","sender":"inot"}, {"id":"3","message":"Hi","sender":"marza...

How to retrieve value from json output?

Hi, I am new to json. I have json output that looks like this [ { "employees": { "education": "BE\/B.Tech" }, "0": { "count": "1" } }, { "employees": { "education": "MBA" }, "0": { "count": "3" } } ] I want...

How to convert Jquery.serialize() data to JSON object?

Is there any better solution to convert a form data that is already serialized by jQuery function serialize(), when the form contains multiple input Array fields. I want to be able to convert the form data in to a JSON object to recreate some other informative tables. So tell me a better way to get the serialize string converted as a JSO...

Reloading a json store with new parameters ExtJs Ext.data.JsonStore

I am currently having trouble of reloading a json store with new parameters. Here is my store: newsletters = new Ext.data.JsonStore({ url: '/newsletters/', root: 'results', fields: [ 'id', 'body' 'recipients' ], baseParams: { command: 'json', to: dateTo, fro...

Evaluate string as Object without eval() dynamically?

EDIT: Thanks Kenny and everyone else who answered similarly. It really was a DOH...So stupid of me not to remember this. Maybe the answer is so simple it's eluding me...but I know someone here can school me on this hopefully. So I've got a rather large project that's dealing with tons of very large JSON, Objects, Arrays, etc..And I ne...

Fill Table View with JSON

Here goes a newbie question: Create a new project in Xcode: File > New Project and select Navigation-based Application from iPhone OS templates. Install json-framework as explained here. Edit RootViewController.h's interface section into this: @interface RootViewController : UITableViewController { NSURLRequest *request; NSURL...

JSON parser doesn't work

For some reason my json twitter parser isn't working? Anyone got any ideas as to why? <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"&gt;&lt;/script&gt; <script type="text/javascript"> function outputHtmlToDiv(tweet,i){ count = i + 1; $('#wrapper #sidebar .profile')...

Create JSON-object the correct way

I am trying to create an JSON object out of a PHP array. The array looks like this: $post_data = array('item_type_id' => $item_type, 'string_key' => $string_key, 'string_value' => $string_value, 'string_extra' => $string_extra, 'is_public' => $public, 'is_public_for_contacts' => $public_contacts); The code to encod...

PHP cURL code fails online but not on localhost. Please help!

Hello Everyone! I cannot figure out why this code works locally on my PC (localhost) but not online on a public server? Can it be a PHP version issue? Thankful for all help! $post_data = array('item_type_id' => '8', 'string_key' => 'Test Nyckel2', 'string_value' => 'Test Varde2', 'string_extra' => 'Test Extra', 'numeric_extra' => 'T...

JSONstore not returning data properly

Hello All, I've had this problem for awhile now, but I keep narrowing down the issue and I think I have main problem figured out now. While my JSONstore calls to the PHP correctly, and firebug does give me the correct data back from the database, it will not display in my grid. I have a grid with only 2 columns a date, and an entry fro...

jquery datatables stuck on AJAX server side table

All, Wondering if someone could help. I've been using DataTables quite some time both via dom manipulation and JSON code. However, two of our larger resultsets are still running too slow, so I'm attempting to convert them over to client-side data sources. I have the table there, with headers, but the data is not being injected into ...

Pitfalls of generating JSON in Django templates

I've found myself unsatisfied with Django's ability to render JSON data. If I use built in serializes then database foreign key relationships are not included in the data (only the keys). Also, it seems to be impossible to include custom data in the json feed that isn't part of the model being serialized. As a test I implemented a tem...

how can i post JSON object through cURL in php

How can I post JSON objects to a web service, through cURL in php? I have an array $data = array('username'=>'abc','password'=>'pass'); The webservice which I want to call accepts JSON object, if I convert the $data to JSON with json_encode, its not working for me. $data = json_encode($data); curl_setopt($ch, CURLOPT_POST ,1);...

Problem with the regex of Zend_Json prettyPrint

Hi, I have a problem with the regex of Zend_Json::prettyPrint. When in my JSON response I have a string with a comma inside like "stack, overflow" the string is splited in two: "stack, overflow" and I would like to have the string on the same line and not splited. In the file Zend/Json I found the regex: $tokens = preg_split('...

What is the best method to populate form with jQuery?

Hello all, I have used jQuery Form plugin to submit the whole form data to server while Ajax. When the server code (php) returns, the retrieved data is in JSON format. What is the best method to populate the form with jQuery. Here is what I want to do: The user enters the data on the form The user submits the form data (I use ajax to...

Reading JSON from a text file

I know of some JSON libs around and I'm currently looking into Google-JSON but all I want to achieve is something simple and I want to know what you would suggest. I want a JSON library which will let me read a textfile that is in JSON and let me convert it into strings, int, boolean, etc. -- Now using Json.org/java It can READ! BUT!!...