normalize

package
v2.6.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 4, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package normalize provides a a function to process a JSON input and return it in normalized form.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Normalize

func Normalize(jsonBytes []byte) ([]byte, error)

Normalize takes JSON and returns normalized JSON.

Normalization includes:

  • Sorting keys according to the configured importance.
  • Consistent indentation.

func Verify added in v2.1.0

func Verify(jsonBytes []byte) (bool, error)

Types

type KeyImportanceOverride

type KeyImportanceOverride struct {
	KeyImportance map[string]int
	When          func(key string, value interface{}) bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址