0

Output JSON

asked 2012-07-13 06:04:41 +0800

phillipberry gravatar image phillipberry
24 1

Hello,

Is it possible to output JSON directly from ZK (I.e without resorting to a Servlet)?

I've created Richlet but it outputs the xhtml header <script> tags, etc.

I just want to output pure JSON.

Is that possible?

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2012-07-20 04:22:26 +0800

paowang gravatar image paowang
140 6

So, you want to write controller that can access ZK resources and output raw JSON, right?
Maybe, we can just use Servlet as controller and use Bridge to access ZK resources.
Check this: http://www.zkoss.org/javadoc/latest/zk/org/zkoss/zkplus/embed/Bridge.html

link publish delete flag offensive edit

answered 2012-07-16 13:47:23 +0800

phillipberry gravatar image phillipberry
24 1

Just raw JSON data of any type.

I'm trying implement a JSON RPC server within ZK. So instead of outputting HTML to the browser file my controller would output raw JSON.

link publish delete flag offensive edit

answered 2012-07-16 04:15:18 +0800

paowang gravatar image paowang
140 6

What kind of data the JSON object indicates? and who will receive it ?

I think that ZUL and Richlet can not be used in such purpose.
They always output html.

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2012-07-13 06:04:41 +0800

Seen: 275 times

Last updated: Jul 20 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More