code: func (bis *baseInnerState) marshalStateJSON(stateType string,
  	additionalData map[string]interface{}) ([]byte, error) {
  	if additionalData == nil {
  		additionalData = make(map[string]interface{})
  	}
  	additionalData["Type"] = stateType
  	if bis.next != nil {
  		additionalData["Next"] = bis.next.Name()
  	}
  	if bis.comment != "" {
  		additionalData["Comment"] = bis.comment
  	}
  	if bis.inputPath != "" {
  		additionalData["InputPath"] = bis.inputPath
  	}
  	if bis.outputPath != "" {
  		additionalData["OutputPath"] = bis.outputPath
  	}
  	if !bis.isEndStateInvalid && bis.next == nil {
  		additionalData["End"] = true
  	}
  	// Output the pretty version
  	return json.Marshal(additionalData)
  }
docs: // marshalStateJSON for subclass marshalling of state information