Class WriteJSONStep
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<org.jenkinsci.plugins.workflow.steps.Step>
-
- org.jenkinsci.plugins.workflow.steps.Step
-
- org.jenkinsci.plugins.pipeline.utility.steps.json.WriteJSONStep
-
- All Implemented Interfaces:
ExtensionPoint,Describable<org.jenkinsci.plugins.workflow.steps.Step>
public class WriteJSONStep extends org.jenkinsci.plugins.workflow.steps.StepWrites aJSONobject to file in the current working directory.- Author:
- Nikolas Falco
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classWriteJSONStep.DescriptorImpl-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description WriteJSONStep(Object json)WriteJSONStep(String file, Object json)Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetFile()Returns the name of the file to write.ObjectgetJson()Return the JSON object to save.intgetPretty()Return the number of spaces used to prettify the JSON dump.booleanisReturnText()voidsetFile(String file)voidsetReturnText(boolean returnText)org.jenkinsci.plugins.workflow.steps.StepExecutionstart(org.jenkinsci.plugins.workflow.steps.StepContext context)
-
-
-
Constructor Detail
-
WriteJSONStep
@DataBoundConstructor public WriteJSONStep(Object json)
-
WriteJSONStep
@Deprecated public WriteJSONStep(String file, Object json)
Deprecated.
-
-
Method Detail
-
getFile
public String getFile()
Returns the name of the file to write.- Returns:
- the file name
-
setFile
@DataBoundSetter public void setFile(String file)
-
getJson
public Object getJson()
Return the JSON object to save.If it is not a
JSONobject,JSONObject.fromObject(Object)will be used in a first step.- Returns:
- an object
-
getPretty
public int getPretty()
Return the number of spaces used to prettify the JSON dump.- Returns:
- a int
-
isReturnText
public boolean isReturnText()
-
setReturnText
@DataBoundSetter public void setReturnText(boolean returnText)
-
-