Documentation
¶
Overview ¶
Package jsonhelper provides helper methods for working with JSON
Index ¶
- func ConvertToJSONBuffer(b interface{}) (*bytes.Buffer, error)
- func ConvertToJSONString(in interface{}, prettyPrint bool) (string, error)
- func CreateJSONLogMessage(message string, jsonString string) string
- func IsJSONString(s string) bool
- func PrintPrettyJSON(in string) (string, error)
- func ShowAsJSON(objName string, body interface{}) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertToJSONBuffer ¶
Converts any object into a JSON representation, returned in a buffer
func ConvertToJSONString ¶
func CreateJSONLogMessage ¶
JSONToLogMessage logs a json string with pretty format with a message
func IsJSONString ¶
IsJSONString determines whether a string is JSON
func PrintPrettyJSON ¶
Returns a nicely formatted copy of a JSON string
func ShowAsJSON ¶
ShowAsJSON shows obj in json pretty format.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.