Package org.apache.tapestry5.json.modules

# Class JSONModule

java.lang.Object
org.apache.tapestry5.json.modules.JSONModule

public class JSONModule extends Object
A module that integrates JSON into Tapestry in terms of type coercions. tapestry-json can still be used independently of the rest of Tapestry (since its a 'provided' dependency), but when used with tapestry-ioc on the classpath, the coercions described by this module become available.

Since:
  5.3

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `JSONModule()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `provideCoercions(MappedConfiguration<CoercionTuple.Key,CoercionTuple> configuration)`
  `String` to `JSONObject` `String` to `JSONArray`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### JSONModule

    public JSONModule()

- ## Method Details

  - ### provideCoercions

    @Contribute(TypeCoercer.class) public static void provideCoercions(MappedConfiguration<CoercionTuple.Key,CoercionTuple> configuration)
    - `String` to `JSONObject`
    - `String` to `JSONArray`
    Parameters:
      `configuration` - the configuration to provide the type coercer to