You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: helpers.go
    path of file: ./repos/openmtp/ffi/kalam/native/send_to_js
    
    the code of the file until where you have to start completion: package send_to_js

import (
	"fmt"
	"github.com/ganeshrvel/go-mtpfs/mtp"
	"github.com/ganeshrvel/go-mtpx"
	jsoniter "github.com/json-iterator/go"
	"strings"
)

// process errors
func
    
func toJson(o interface{}) string {
	var json = jsoniter.ConfigFastest
	w, err := json.Marshal(&o)
	if err != nil {
		fmt.Printf("error occured in SendError.json.Marshal %+v: ", err)

		return ""
	}

	return string(w)
}