I think this question is like clay pidgeon shooting.. "pull... bang!" .. shot down.. but nevertheless, it's worth asking I believe.
Lots of JS frameworks etc use JSON these days, and for good reason I know. The classic question is "where to transform the data to JSON".
I understand that at some point in the pipeline, you have to conver...
Hi, I am COMPLETELY not getting this so I'm going to ask. This is for an exercise that I'm using to try and learn JSON and jQuery together.
I'm pretty sure that my code is doing everything it's supposed to, but I can't seem to figure out how to a)read the JSON that's being returned and b)be able to use the result afterwards (which I'm gu...
Hello
Im trying to pass an array from javascript to java servlet using Jackson, how this can be done..thanks
...
Hi folks,
I have three models (simplified here):
class Child < ActiveRecord::Base
has_many :childviews, :dependent => :nullify
has_many :observations, :through => :childviews
end
class Childview < ActiveRecord::Base
belongs_to :observation
belongs_to :child
end
class Observation < ActiveRecord::Base
has_many :chi...
I am working with Node.js to build a web socket server that uses mongodb.
I am using node-mongodb-native as the library to access mongo db.
When I call console.log(sys.inspect(item)) on an object from the db I get something that looks like this:
{ _id: { id: 'L?#&\u008e\u00ad\u000e\u008f\u0014\u0005\u0000\u0000' }
, y: 3
, favorite_c...
Hi
I am trying to serialize and de-serialize (with Json and ObjectMapper) an polymorphic list of Objects that have the following annotation on the base class:
@JsonTypeInfo(use=JsonTypeInfo.Id.CLASS, include=JsonTypeInfo.As.PROPERTY, property="@class")
When I write the object itself it does include the polymorphic property class in t...
I've been living in the desktop world for most of my career, so forgive me for asking such a basic question, but I'm not quite sure where to start looking.
I want to return some raw data along with my HTML, and parse and display the data using jQuery as soon as the HTML is ready. I know roughly what my js code should look like, but I'm ...
Hi All
I have a really annoying problem , please take a look at the code:
ObjectMapper mapper = new ObjectMapper();
List<Message> messageList = new ArrayList<Message>();
messageList.add(new RoomTextMessage(1,"2","22",1));
messageList.add(new PresenceMessage(1,1,2, UserStatus.OFFLINE));
mapper.enableDefaultTyping(Ob...
I have a crazy idea, which involves putting some clojure code into CouchDB and writing views that query it. I don't want to store the clojure code as plain text, because then I would have to worry about parsing it in the views. Formatting and comments don't need to be preserved, but the code should be able to go in and out of the databas...
I am (trying) to build a web app, first one :)
I need to call a JSON object though, and I am using a simple search form to get a word that I will append to the call, but I need PHP to handle the object when it is returned. How can I do this?
Basically I had the form submit calling a function that, ideally, would go get the object and do ...
Currently my AJAX is working like this:
index.php
<a href='one.php' class='ajax'>One</a>
<div id="workspace">workspace</div>
one.php
$arr = array ( "workspace" => "One" );
echo json_encode( $arr );
ajax.js
jQuery(document).ready(function(){
jQuery('.ajax').live('click', function(event) {
event.preventDefault();
...
I've a large JSON string describing some data. I'd like to loop through this and replace value of all properties named "Key". How can I achieve this using jQuery or plain Javascript?
...
I'm a Python programmer with experience using the json module. I've just meet CouchDB and seems very interesting.
I wonder know if JSON data structures can be directly saved as a CouchDB document.
Thanks,
...
anyone know which is better (setup, usage, flexibility, performance) obviously in your personal opinion/experience and applied work with these?
JSon.NET or cjson ??
I have not used either and was about to create my own parser which I realize is a whole different ballgame.
...
I've been working on this for a couple of hours and it should work but i'm missing something!
basically, i'm using jquery autocomplete with json source, with 2 values id and description.
Description should show up in suggestions and if item is selected and ID passed to a hidden field ( the field is not hidden currently for testing purpo...
I am considering using AHAH extensively on a project and am concerned about security. Couldn't an attacker inject malicious code into my response that would then be executed in the client? If my AJAX response is JSON, I don't have to worry about this because if things are tampered with the JSON will no longer be valid.
On the other hand...
I have a relatively simple example of an MVC page that is using jQuery to make a POST to get some JSON data and then just show a success/failure message when it is done. The code works perfectly fine in the other browsers but in IE7/8 it seems to fail 4/5 times.
Here is the MVC View Page:
<asp:Content runat="server" ContentPlaceHolderI...
Hello,
I would like to write a list to a file and read back the contents of the file into a list.
I am able to write the list to the file using simplejson as follows:
f = open("data.txt","w")
l = ["a","b","c"]
simplejson.dump(l,f)
f.close()
Now to read the file back i do
file_contents = simplejson.load(f)
But, i guess file_conten...
I'm considering two different ways of completing the same task of displaying dynamic HTML using AJAX. The first method is to simply generate the HTML server-side and then insert it via. the DOM (jQuery's $().load() actually). The second method is to generate JSON server side and then use that data to inject elements into the DOM.
I woul...
Hi,
I am using asmx to retrieve some data from DB,
public class TestPage1
{
public int UserID { get; set; }
public string UserName { get; set; }
public string Password { get; set; }
public string FirstName { get; set; }
public string LastName { get; set; }
public string MiddleName { get; set; }
}
[WebMet...