code: func ProcessJSON(input []byte, options *ProcessorOptions) ([]byte, error) {
  
  	// First, unmarshal the JSON to a generic interface{} type
  	var unmarshalled interface{}
  	if err := json.Unmarshal(input, &unmarshalled); err != nil {
  		return nil, fmt.Errorf("invalid JSON: %s", err)
  	}
  
  	var processed interface{}
  
  	if options != nil && options.NoProcess {
  		processed = unmarshalled
  	} else {
  		applyGlobals(unmarshalled, options)
  
  		overrideParameters(unmarshalled, options)
  
  		evaluateConditions(unmarshalled, options)
  
  		// Process all of the intrinsic functions
  		processed = search(unmarshalled, unmarshalled, options)
  	}
  
  	// And return the result back as a []byte of JSON
  	result, err := json.MarshalIndent(processed, "", "  ")
  	if err != nil {
  		return nil, fmt.Errorf("invalid JSON: %s", err)
  	}
  
  	return result, nil
  }
docs: // ProcessJSON recursively searches through a byte array of JSON data for all
  // AWS CloudFormation intrinsic functions, resolves them, and then returns
  // the resulting  interface{} object.