Discover Packages
github.com/cloudprober/cloudprober
validators
json
package
Version:
v0.12.2
Opens a new window with list of versions in this module.
Published: Jan 17, 2023
License: Apache-2.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Package json provides JSON validator for the Cloudprober's
validator framework.
type Validator struct {
}
Validator implements a regex validator.
Init initializes the JSON validator.
It parses the jq filter in the configuration and returns an error if it
doesn't parse for some reason.
Validate the provided responseBody. If no jq filter is configured, it
returns true if responseBody is a valid JSON. If jq filter is configured,
validator returns true if jq filter returns true.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.