Documentation
¶
Index ¶
- Constants
- func Base64JSONDecode[T any](s string) (T, error)
- func Base64JSONEncode[T any](t T) string
- func Canonicalize(raw []byte) ([]byte, error)
- func CanonicalizeObject(raw []byte, maximum int) ([]byte, error)
- func DecodeJSONRaw[T any](raw json.RawMessage) (T, error)
- func EncodeToJSONRaw(value any) (json.RawMessage, error)
- func Equal(left, right []byte) bool
Constants ¶
View Source
const (
EmptyObject = "{}"
)
Variables ¶
This section is empty.
Functions ¶
func Base64JSONDecode ¶
func Base64JSONEncode ¶
func Canonicalize ¶ added in v0.2.13
func CanonicalizeObject ¶ added in v0.2.13
func DecodeJSONRaw ¶
func DecodeJSONRaw[T any](raw json.RawMessage) (T, error)
DecodeJSONRaw decodes a json.RawMessage into a typed value T, disallowing unknown fields and rejecting trailing data. If raw is empty, or only whitespace, it returns the zero value of T.
func EncodeToJSONRaw ¶
func EncodeToJSONRaw(value any) (json.RawMessage, error)
EncodeToJSONRaw encodes any value to json.RawMessage. No typed method here as value being of a type doesnt really affect its functionality.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.