Configuring Tomcat 6 for JSON - json

This seems like a silly question, but I haven't really seen a good guide or best practices for getting Tomcat to respond to JSON requests. Does anyone know of one? We'll be handling a lot of requests so I need to consider redundancy and efficiency.
Thanks.

Consider using Jackson oder JSON-Lib to transform your output from within your servlets/controllers.

Related

Store blog posts in a json file

I am thinking of putting my post data for my blog in a json file. Is this a good solution? Can I store html in it so it will render? Or am I just signing up for a nightmare? Thanks
Yes, you can. Here is a link showing some of the thing you'll have to deal with.
I would recommend doing this via an SQL database as it will be quite a bit faster (and possibly easier), but using json is a completely doable solution (although not quite the recommended.)

Dart + JSON + Neo4j: Is there a tutorial somewhere?

I've been playing around with Dart and Neo4j lately, with dreams of building Really Cool Things with these new technologies. I think I understand REST and can wrap my head around JSON. I've read both the Dart and the Neo4j documentation on using REST and JSON within each respective domain. Putting the two together, however, I have met with only very limited success. I'm really hoping someone out there might know of a tutorial or something that can get me started.
So far, I've been able to get Dart to query the database at 12.34.56.78:7474 and get it to return the address for the root node (12.34.56.78:7474/db/data) and the admin interface. When I try to query the root node, though, I get nothing back, even though, as far as I can tell in the documentation, I should be getting information about the database version and so on. At least that's what I see when I use RESTClient to view the database root node.
I'm a pretty experienced IT tech and coder, but I have to admit this is new territory for me.
Would be really cool if you could start that Dart-Neo4j integration and then let the community know about it?
/peter
To close this out, I don't think there is a tutorial for Dart + Neo4j, at the time of this writing.
You might be interested in Dart + MongoDB by using http://pub.dartlang.org/packages/mongo_dart

Building a networking event system, what data format should I use?

I'm using Node.js to build an event based game server (to a flash client). But, I'm having trouble finding examples of how I should architect this message passing.
To simplify things, I was thinking in using a json:
{signature: 'event_name', { /* event data /*} }
So I can easily write to socket using any serialization library. Is it a good idea? Please point me to articles, tutorials or books if you think I don't know what I'm doing at all (which I think is the case)
I would use AMF. There is a pure javascript version of it: http://www.jamesward.com/2010/07/07/amf-js-a-pure-javascript-amf-implementation/
BSON is what you are looking for, it has similar properties to JSON, but it a lot smaller and faster to parse. The MongoDB driver for node has a BSON library in it, I don't know about any Flash librarys though.

JSON to JSON transformation (preferably inside Apache Camel)

I have somewhat unique requirement, which I could not find an answer to so far. I need a JSON to JSON transformation. Preferably, if I could plug it into Apache Camel, that would be wonderful.
As a side note, I would also welcome any suggestion to optimally store the JSON to JSON mapping. Is there any XSLT-based way of achieving this?
Thanks!
Mario
ZORBA with jsonIQ : http://www.jsoniq.org/
it's a native library, but with high performance. You have examples in the web page.
There is a simple design here: https://rawgithub.com/chunqishi/edu.brandeis.cs.json2json/master/docs/design-2014-04-09.html
May be you can improve it by source code, https://github.com/chunqishi/edu.brandeis.cs.json2json.
I know this is an old question, but to refresh the answers, starting from Camel 2.16 there is a new component for JOLT integration. It is very powerful !

best way to input a complex data structure into a gui (eclipse)

i have a exlipse plugin which can call a service and the user has to sepcifie the values of the parameters for it. these parameters may be complex.
i was thinking what would be the best way to provide input for them.
I know about the structure of the data type so something like a json template where the user would just fill out the values came to my mind.
But maybe there is a better solution and/or related work on that subject.
best regards
Well, your question is kind of vague, but if I understand you correctly, the common way to do what you need, in eclipse plugin and RCP development, is to define a model and bind data to it using JFace Data Binding. Lars Vogel wrote a good tutorial on this subject.