org.wso2.extension.siddhi.execution.map

## Class ToJSONFunctionExtension

- java.lang.Object
- - org.wso2.siddhi.core.executor.function.FunctionExecutor
  - - org.wso2.extension.siddhi.execution.map.ToJSONFunctionExtension

- All Implemented Interfaces:
    org.wso2.siddhi.core.executor.ExpressionExecutor, org.wso2.siddhi.core.util.snapshot.Snapshotable

      public class ToJSONFunctionExtension
      extends org.wso2.siddhi.core.executor.function.FunctionExecutor

  toJSON(Map) Returns a string representation of the map in JSON format Accept Type(s): (Map) Return Type(s): String

- - ### Field Summary

    - ### Fields inherited from class org.wso2.siddhi.core.executor.function.FunctionExecutor

      `attributeExpressionExecutors, elementId, functionId, queryName, siddhiAppContext`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ToJSONFunctionExtension()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Map<String,Object>` | `currentState()`
    `protected Object` | `execute(Object data)`
    `protected Object` | `execute(Object[] data)`
    `org.wso2.siddhi.query.api.definition.Attribute.Type` | `getReturnType()`
    `protected void` | `init(org.wso2.siddhi.core.executor.ExpressionExecutor[] attributeExpressionExecutors, org.wso2.siddhi.core.util.config.ConfigReader configReader, org.wso2.siddhi.core.config.SiddhiAppContext siddhiAppContext)`
    `void` | `restoreState(Map<String,Object> state)`

    - ### Methods inherited from class org.wso2.siddhi.core.executor.function.FunctionExecutor

      `cloneExecutor, execute, getElementId, initExecutor`

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

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

- - ### Constructor Detail

    - #### ToJSONFunctionExtension

          public ToJSONFunctionExtension()

  - ### Method Detail

    - #### init

          protected void init(org.wso2.siddhi.core.executor.ExpressionExecutor[] attributeExpressionExecutors,
                              org.wso2.siddhi.core.util.config.ConfigReader configReader,
                              org.wso2.siddhi.core.config.SiddhiAppContext siddhiAppContext)

      Specified by:
        `init` in class `org.wso2.siddhi.core.executor.function.FunctionExecutor`

    - #### execute

          protected Object execute(Object[] data)

      Specified by:
        `execute` in class `org.wso2.siddhi.core.executor.function.FunctionExecutor`

    - #### execute

          protected Object execute(Object data)

      Specified by:
        `execute` in class `org.wso2.siddhi.core.executor.function.FunctionExecutor`

    - #### getReturnType

          public org.wso2.siddhi.query.api.definition.Attribute.Type getReturnType()

    - #### currentState

          public Map<String,Object> currentState()

    - #### restoreState

          public void restoreState(Map<String,Object> state)

Copyright © 2018 WSO2. All rights reserved.