com.amazonaws.services.simpleworkflow.flow

## クラス JsonDataConverter

- java.lang.Object
- - com.amazonaws.services.simpleworkflow.flow.DataConverter
  - - com.amazonaws.services.simpleworkflow.flow.JsonDataConverter

-     public class JsonDataConverter
      extends DataConverter

  Implements conversion through Jackson JSON processor. Consult its documentation on how to ensure that classes are serializable, configure their serialization through annotations and `ObjectMapper` parameters.

  Note that default configuration used by this class includes class name of the every serialized value into the produced JSON. It is done to support polymorphic types out of the box. But in some cases it might be beneficial to disable polymorphic support as it produces much more concise and portable output.

  作成者:
    fateev

- - ### フィールドの概要

    フィールド
    修飾子とタイプ | フィールドと説明
    --- | ---
    `protected org.codehaus.jackson.map.ObjectMapper` | `mapper`

  - ### コンストラクタの概要

    コンストラクタ
    コンストラクタと説明
    `JsonDataConverter()` Create instance of the converter that uses ObjectMapper with `Feature#FAIL_ON_UNKNOWN_PROPERTIES` set to `false` and default typing set to `ObjectMapper.DefaultTyping.NON_FINAL`.
    `JsonDataConverter(org.codehaus.jackson.map.ObjectMapper mapper)` Create instance of the converter that uses `ObjectMapper` configured externally.

  - ### メソッドの概要

    メソッド
    修飾子とタイプ | メソッドと説明
    --- | ---
    `<T> T` | `fromData(java.lang.String serialized, java.lang.Class<T> valueType)` Implements conversion of the single value.
    `java.lang.String` | `toData(java.lang.Object value)` Implements conversion of the single value.

    - ### クラスから継承されたメソッド java.lang.Object

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

- - ### フィールドの詳細

    - #### mapper

          protected final org.codehaus.jackson.map.ObjectMapper mapper

  - ### コンストラクタの詳細

    - #### JsonDataConverter

          public JsonDataConverter()

      Create instance of the converter that uses ObjectMapper with `Feature#FAIL_ON_UNKNOWN_PROPERTIES` set to `false` and default typing set to `ObjectMapper.DefaultTyping.NON_FINAL`.

    - #### JsonDataConverter

          public JsonDataConverter(org.codehaus.jackson.map.ObjectMapper mapper)

      Create instance of the converter that uses `ObjectMapper` configured externally.

  - ### メソッドの詳細

    - #### toData

          public java.lang.String toData(java.lang.Object value)
                                  throws DataConverterException

      クラスからコピーされた説明: `DataConverter`
      Implements conversion of the single value.
      定義:
        `toData` クラス内 `DataConverter`
      パラメータ:
        `value` - Java value to convert to String.
      戻り値:
        converted value
      例外:
        `DataConverterException` - if conversion of the value passed as parameter failed for any reason.

    - #### fromData

          public <T> T fromData(java.lang.String serialized,
                       java.lang.Class<T> valueType)
                     throws DataConverterException

      クラスからコピーされた説明: `DataConverter`
      Implements conversion of the single value.
      定義:
        `fromData` クラス内 `DataConverter`
      戻り値:
        converted Java object
      例外:
        `DataConverterException` - if conversion of the data passed as parameter failed for any reason.