org.apache.jmeter.extractor.json.render

## Class RenderAsJsonRenderer

- java.lang.Object
- - org.apache.jmeter.extractor.json.render.RenderAsJsonRenderer

- All Implemented Interfaces:
    ActionListener, EventListener, ResultRenderer

      public class RenderAsJsonRenderer
      extends Object

  Implement ResultsRender for JSON Path tester
  Since:
    3.0

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected static String` | `NO_MATCH`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `RenderAsJsonRenderer()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `actionPerformed(ActionEvent e)` Display the response as text or as rendered HTML.
    `void` | `clearData()`
    `protected void` | `executeTester(String textToParse)` Launch JSON path engine to parse a input text
    `protected String` | `getExpression()`
    `protected JLabeledTextField` | `getExpressionField()`
    `protected String` | `getExpressionLabel()`
    `protected JSyntaxTextArea` | `getJsonDataField()`
    `protected JPanel` | `getJsonWithExtractorPanel()`
    `protected JTextArea` | `getResultField()`
    `protected JTabbedPane` | `getRightSide()`
    `protected String` | `getTabLabel()`
    `protected String` | `getTestButtonLabel()`
    `void` | `init()`
    `protected String` | `process(String textToParse)`
    `void` | `renderImage(SampleResult sampleResult)`
    `void` | `renderResult(SampleResult sampleResult)`
    `void` | `setBackgroundColor(Color backGround)`
    `void` | `setLastSelectedTab(int index)`
    `void` | `setRightSide(JTabbedPane side)`
    `void` | `setSamplerResult(Object userObject)`
    `void` | `setupTabPane()`
    `String` | `toString()`

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

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

- - ### Field Detail

    - #### NO_MATCH

          protected static final String NO_MATCH

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### RenderAsJsonRenderer

          public RenderAsJsonRenderer()

  - ### Method Detail

    - #### getTabLabel

          protected String getTabLabel()

      Returns:
        Tab label

    - #### getTestButtonLabel

          protected String getTestButtonLabel()

      Returns:
        Test button label

    - #### getExpressionLabel

          protected String getExpressionLabel()

      Returns:
        The label for the technology expression

    - #### process

          protected String process(String textToParse)

      Parameters:
        `textToParse` - String of the response to process
      Returns:
        the extracted values using the technology

    - #### toString

          public String toString()

      Specified by:
        `toString` in interface `ResultRenderer`
      Overrides:
        `toString` in class `Object`
      Returns:
        the string to be displayed by the ComboBox

    - #### clearData

          public void clearData()

      Specified by:
        `clearData` in interface `ResultRenderer`

    - #### init

          public void init()

      Specified by:
        `init` in interface `ResultRenderer`

    - #### actionPerformed

          public void actionPerformed(ActionEvent e)

      Display the response as text or as rendered HTML. Change the text on the button appropriate to the current display.
      Specified by:
        `actionPerformed` in interface `ActionListener`
      Parameters:
        `e` - the ActionEvent being processed

    - #### executeTester

          protected void executeTester(String textToParse)

      Launch JSON path engine to parse a input text
      Parameters:
        `textToParse` - the text that will be parsed

    - #### getExpression

          protected String getExpression()

    - #### renderResult

          public void renderResult(SampleResult sampleResult)

      Specified by:
        `renderResult` in interface `ResultRenderer`

    - #### setupTabPane

          public void setupTabPane()

      Specified by:
        `setupTabPane` in interface `ResultRenderer`

    - #### setRightSide

          public void setRightSide(JTabbedPane side)

      Specified by:
        `setRightSide` in interface `ResultRenderer`

    - #### setSamplerResult

          public void setSamplerResult(Object userObject)

      Specified by:
        `setSamplerResult` in interface `ResultRenderer`

    - #### setLastSelectedTab

          public void setLastSelectedTab(int index)

      Specified by:
        `setLastSelectedTab` in interface `ResultRenderer`

    - #### renderImage

          public void renderImage(SampleResult sampleResult)

      Specified by:
        `renderImage` in interface `ResultRenderer`

    - #### setBackgroundColor

          public void setBackgroundColor(Color backGround)

      Specified by:
        `setBackgroundColor` in interface `ResultRenderer`

    - #### getRightSide

          protected JTabbedPane getRightSide()

      Returns:
        the rightSide

    - #### getJsonWithExtractorPanel

          protected JPanel getJsonWithExtractorPanel()

      Returns:
        the jsonWithExtractorPanel

    - #### getJsonDataField

          protected JSyntaxTextArea getJsonDataField()

      Returns:
        the jsonDataField

    - #### getExpressionField

          protected JLabeledTextField getExpressionField()

      Returns:
        the expressionField

    - #### getResultField

          protected JTextArea getResultField()

      Returns:
        the resultField

Copyright © 1998-2021 Apache Software Foundation. All Rights Reserved.