Package org.apache.jmeter.visualizers

# Class RenderAsJSON

java.lang.Object
org.apache.jmeter.visualizers.SamplerResultTab
org.apache.jmeter.visualizers.RenderAsJSON

All Implemented Interfaces:
  `ResultRenderer`

@AutoService(ResultRenderer.class) public class RenderAsJSON extends SamplerResultTab implements ResultRenderer

## Nested Class Summary

## Nested classes/interfaces inherited from class org.apache.jmeter.visualizers.SamplerResultTab

`SamplerResultTab.RowResult`

## Field Summary

### Fields inherited from class org.apache.jmeter.visualizers.SamplerResultTab

`activateSearchExtension, CLIENT_ERROR_COLOR, REDIRECT_COLOR, REQUEST_VIEW_COMMAND, results, resultsScrollPane, rightSide, searchTextExtension, SERVER_ERROR_COLOR, TEXT_COMMAND`

## Constructor Summary

Constructors
Constructor
Description
`RenderAsJSON()`

## Method Summary

Modifier and Type
Method
Description
`static String`
`prettyJSON(String json)`
Pretty-print JSON text
`static String`
`prettyJSON(String json, String tabSeparator)`
Pretty-print JSON text
`void`
`renderResult(SampleResult sampleResult)`
`String`
`toString()`

### Methods inherited from class org.apache.jmeter.visualizers.SamplerResultTab

`clearData, init, renderImage, setBackgroundColor, setLastSelectedTab, setRightSide, setSamplerResult, setTextOptimized, setupTabPane`

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

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

### Methods inherited from interface org.apache.jmeter.visualizers.ResultRenderer

`clearData, init, renderImage, setBackgroundColor, setLastSelectedTab, setRightSide, setSamplerResult, setupTabPane`

## Constructor Details

### RenderAsJSON

public RenderAsJSON()

## Method Details

### renderResult

public void renderResult(SampleResult sampleResult)

Specified by:
  `renderResult` in interface `ResultRenderer`

### prettyJSON

public static String prettyJSON(String json)
Pretty-print JSON text

Parameters:
  `json` - input text
Returns:
  prettied json string

### prettyJSON

public static String prettyJSON(String json, String tabSeparator)
Pretty-print JSON text

Parameters:
  `json` - input text
  `tabSeparator` - String tab separator
Returns:
  prettied json string

### toString

public String toString()

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