21bc48ca29
this was unecessary after refactoring, so this moves them back to their original location in package structs
23 lines
631 B
Go
23 lines
631 B
Go
package structs
|
|
|
|
import (
|
|
"github.com/hashicorp/go-msgpack/codec"
|
|
)
|
|
|
|
var (
|
|
// JsonHandle and JsonHandlePretty are the codec handles to JSON encode
|
|
// structs. The pretty handle will add indents for easier human consumption.
|
|
// JsonHandleWithExtensions and JsonHandlePretty include extensions for
|
|
// encoding structs objects with API-specific fields
|
|
JsonHandle = &codec.JsonHandle{
|
|
HTMLCharsAsIs: true,
|
|
}
|
|
JsonHandleWithExtensions = NomadJsonEncodingExtensions(&codec.JsonHandle{
|
|
HTMLCharsAsIs: true,
|
|
})
|
|
JsonHandlePretty = NomadJsonEncodingExtensions(&codec.JsonHandle{
|
|
HTMLCharsAsIs: true,
|
|
Indent: 4,
|
|
})
|
|
)
|