Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.tapestry5.json
Class JSONLiteral

    java.lang.Object
      org.apache.tapestry5.json.JSONLiteral

All Implemented Interfaces:
  JSONString

    public class JSONLiteral

extends java.lang.Object
implements JSONString

A way of including some text (often, text that violates the normal JSON specification) as part of a JSON object or array. This is used in a few places where data is nominally JSON but actually includes some non-conformant elements, such as an inline function definition.

Since:
  5.1.0.2

Constructor Summary
`JSONLiteral(java.lang.String text)`

Method Summary
`java.lang.String` | `toJSONString()` The `toJSONString` method allows a class to produce its own JSON serialization.
`java.lang.String` | `toString()` Returns the text property; this is also the value placed into the JSON string (unquoted, exactly as is).

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### JSONLiteral

    public JSONLiteral(java.lang.String text)

Method Detail

### toString

    public java.lang.String toString()

  Returns the text property; this is also the value placed into the JSON string (unquoted, exactly as is).

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    the text

### toJSONString

    public java.lang.String toJSONString()

  Description copied from interface: `JSONString`
  The `toJSONString` method allows a class to produce its own JSON serialization.

  Specified by:
    `toJSONString` in interface `JSONString`
  Returns:
    A strictly syntactically correct JSON text.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2003-2012 The Apache Software Foundation.