org.apache.tapestry.json
Interface IJSONWriter

All Known Implementing Classes:
JSONWriterImpl

public interface IJSONWriter

JavaScript Object Notation writer which manages two core object response types, JSONObject or JSONArray. It is up to the components participating in a particular response to decide how to cooperate and build a JSON structure that their client side will accept.

Author:
JSON.org, jkuhnert
See Also:
"http://www.json.org/"

Method Summary
 JSONArray array()
          Provides access to the core outer JSONArray being rendered to a response.
 void close()
          Causes any un-ended blocks to be closed, as well as any reasources associated with writer to be flushed/written.
 void flush()
          Forwards flush() to this IJSONWriter's PrintWriter.
 JSONObject object()
          Provides access to the core outer JSONObject being rendered to a response.
 

Method Detail

object

JSONObject object()
Provides access to the core outer JSONObject being rendered to a response. The object may not necessarily be instantiated until requested, for instances where a response should be a pure array or other.

Returns:
The JSONObject being delegated to.

array

JSONArray array()
Provides access to the core outer JSONArray being rendered to a response. The object may not necessarily be instantiated until requested.

Returns:
The JSONArray being delegated to.

close

void close()
Causes any un-ended blocks to be closed, as well as any reasources associated with writer to be flushed/written.


flush

void flush()
Forwards flush() to this IJSONWriter's PrintWriter.



Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.