Playing around with SVG
This commit is contained in:
9
utils/ToJSON.go
Normal file
9
utils/ToJSON.go
Normal file
@ -0,0 +1,9 @@
|
||||
package utils
|
||||
|
||||
import "encoding/json"
|
||||
|
||||
// ToJSON converts an object to a JSON string, ignoring errors.
|
||||
func ToJSON(v interface{}) string {
|
||||
str, _ := json.Marshal(v)
|
||||
return string(str)
|
||||
}
|
Reference in New Issue
Block a user