Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/santhosh-tekuri/jsonschema
/ functions
Functions
377 in github.com/santhosh-tekuri/jsonschema
⨍
Functions
377
◇
Types & classes
115
↓ 81 callers
Function
LocalizableError
-- LocalizableError is an error whose message is localizable.
util.go:449
↓ 38 callers
Method
Compile
Compile compiles json-schema at given loc.
compiler.go:178
↓ 28 callers
Method
AddResource
AddResource adds schema resource which gets used later in reference resolution. The argument url can be file path or url. Any fragment in url is igno
compiler.go:121
↓ 25 callers
Method
addError
(kind ErrorKind)
validator.go:838
↓ 24 callers
Method
String
()
util.go:23
↓ 23 callers
Function
schemaPath
(path string)
position.go:85
↓ 20 callers
Method
Validate
Validate validates v against and errors if any are reported to ctx.
vocab.go:43
↓ 20 callers
Method
addErr
(err error)
validator.go:832
↓ 15 callers
Method
error
(kind ErrorKind)
validator.go:820
↓ 15 callers
Method
hasVocab
--
objcompiler.go:428
↓ 12 callers
Method
enqueueProp
(pname string)
objcompiler.go:382
↓ 12 callers
Function
eprintln
(format string, args ...any)
cmd/jv/main.go:220
↓ 12 callers
Method
validateVal
(sch *Schema, v any, vtok string)
validator.go:682
↓ 11 callers
Function
quote
--
kind/kind.go:616
↓ 11 callers
Method
validateSelf
validation helpers --
validator.go:657
↓ 8 callers
Method
intVal
(pname string)
objcompiler.go:495
↓ 8 callers
Function
split
(str string)
util.go:140
↓ 7 callers
Method
append
(sch *Schema)
compiler.go:285
↓ 7 callers
Method
boolean
(pname string)
objcompiler.go:457
↓ 7 callers
Function
escape
(tok string)
util.go:55
↓ 7 callers
Method
strVal
(pname string)
objcompiler.go:462
↓ 6 callers
Function
UnmarshalJSON
-- UnmarshalJSON unmarshals into [any] without losing number precision using [json.Number].
loader.go:255
↓ 6 callers
Method
addErrors
(errors []*ValidationError, kind ErrorKind)
validator.go:842
↓ 6 callers
Method
enqueuePtr
enqueue helpers --
objcompiler.go:348
↓ 6 callers
Function
equals
(v1, v2 any)
util.go:286
↓ 6 callers
Method
isEmpty
()
validator.go:952
↓ 6 callers
Method
numVal
(pname string)
objcompiler.go:481
↓ 6 callers
Method
resource
(ptr jsonPointer)
root.go:20
↓ 6 callers
Function
strVal
(obj map[string]any, prop string)
util.go:263
↓ 6 callers
Method
string
(pname string)
objcompiler.go:474
↓ 5 callers
Method
AssertContent
AssertContent enables content assertions. Content assertions include keywords: - contentEncoding - contentMediaType - contentSchema Default behavior
compiler.go:65
↓ 5 callers
Method
AssertFormat
AssertFormat always enables format assertions. Default Behavior: for draft-07: enabled. for draft/2019-09: disabled unless metaschema says `format` v
compiler.go:53
↓ 5 callers
Method
RegisterVocabulary
RegisterVocabulary registers custom vocabulary. NOTE: - vocabularies are disabled for draft >= 2019-09 see [Compiler.AssertVocabs]
compiler.go:102
↓ 5 callers
Method
String
()
util.go:250
↓ 5 callers
Method
UseLoader
UseLoader overrides the default [URLLoader] used to load schema resources.
compiler.go:137
↓ 5 callers
Method
collectResources
(r *root, sch any, base url, schPtr jsonPointer, fallback dialect)
roots.go:70
↓ 5 callers
Function
encode
avoids escaping /.
util.go:120
↓ 5 callers
Method
enqueue
(q *queue, up urlPtr)
compiler.go:153
↓ 5 callers
Method
enqueueArr
(pname string)
objcompiler.go:390
↓ 5 callers
Function
jsonPtr
(tokens []string)
output.go:103
↓ 5 callers
Function
splitFragment
(str string)
util.go:131
↓ 5 callers
Function
testDir
(t *testing.T, suite, dpath string, draft *jsonschema.Draft)
suite_test.go:105
↓ 4 callers
Method
AssertVocabs
AssertVocabs always enables user-defined vocabularies assertions. Default Behavior: for draft-07: enabled. for draft/2019-09: disabled unless metasch
compiler.go:112
↓ 4 callers
Method
LocalizedString
(*message.Printer)
validator.go:974
↓ 4 callers
Method
contains
(t jsonType)
schema.go:208
↓ 4 callers
Method
convert
()
util.go:148
↓ 4 callers
Function
display
to be used only for primitive.
kind/kind.go:635
↓ 4 callers
Method
getSchema
(assertVocabs bool, vocabularies map[string]*Vocabulary)
draft.go:266
↓ 4 callers
Function
joinQuoted
(arr []string, sep string)
kind/kind.go:623
↓ 4 callers
Function
joinSubschemas
--
draft.go:355
↓ 4 callers
Function
unevalFrom
(v any, sch *Schema, callerNeeds bool)
validator.go:918
↓ 4 callers
Method
validate
(v any, regexpEngine RegexpEngine, meta *Schema, resources map[jsonPointer]*resource, assertVocabs bool, vocab
validator.go:19
↓ 4 callers
Method
validate
()
validator.go:70
↓ 3 callers
Method
BasicOutput
The `Basic` structure, a flat list of output units.
output.go:149
↓ 3 callers
Method
DefaultDraft
DefaultDraft overrides the draft used to compile schemas without `$schema` field. By default, this library uses the latest draft supported. The use
compiler.go:43
↓ 3 callers
Method
DetailedOutput
The `Detailed` structure, based on the schema.
output.go:159
↓ 3 callers
Method
KeywordPath
()
validator.go:973
↓ 3 callers
Method
Load
Load loads json from given absolute url.
loader.go:20
↓ 3 callers
Method
MatchString
MatchString reports whether the string s contains any match of the regular expression.
compiler.go:313
↓ 3 callers
Method
String
()
output.go:140
↓ 3 callers
Method
activeVocabs
(assertVocabs bool, vocabularies map[string]*Vocabulary)
draft.go:242
↓ 3 callers
Method
add
(t jsonType)
schema.go:204
↓ 3 callers
Method
append2
(tok1, tok2 string)
util.go:103
↓ 3 callers
Method
arrVal
(pname string)
objcompiler.go:515
↓ 3 callers
Method
boolVal
value helpers --
objcompiler.go:445
↓ 3 callers
Method
child
(sch *Schema, refKeyword string, vid int)
validator.go:878
↓ 3 callers
Method
collect
(v any, ptr jsonPointer)
position.go:10
↓ 3 callers
Function
decode
(frag string)
util.go:115
↓ 3 callers
Function
draftFromURL
(url string)
draft.go:138
↓ 3 callers
Method
enqueueMap
(pname string)
objcompiler.go:403
↓ 3 callers
Method
enqueueRef
(pname string)
objcompiler.go:353
↓ 3 callers
Method
findMissing
(obj map[string]any, reqd []string)
validator.go:848
↓ 3 callers
Method
getID
(obj map[string]any)
draft.go:165
↓ 3 callers
Method
handleMeta
()
validator.go:740
↓ 3 callers
Method
load
(url url)
loader.go:142
↓ 3 callers
Function
loadFile
(path string)
cmd/jv/loader.go:61
↓ 3 callers
Method
lookup
(v any)
util.go:221
↓ 3 callers
Method
metaResource
(sch *Schema)
validator.go:728
↓ 3 callers
Function
newResource
(ptr jsonPointer, id url)
root.go:164
↓ 3 callers
Function
newRoots
()
roots.go:17
↓ 3 callers
Method
objVal
(pname string)
objcompiler.go:503
↓ 3 callers
Function
parseURL
(s string)
format.go:515
↓ 3 callers
Function
printJSON
(v any)
cmd/jv/main.go:225
↓ 3 callers
Method
rootResource
()
root.go:16
↓ 3 callers
Function
toStrings
--
objcompiler.go:541
↓ 3 callers
Function
typeOf
(v any)
schema.go:112
↓ 3 callers
Function
uniqueKeysVocab
Vocab --
example_vocab_uniquekeys_test.go:47
↓ 3 callers
Function
validateDateTime
see https://datatracker.ietf.org/doc/html/rfc3339#section-5.6
format.go:492
↓ 3 callers
Method
validateRef
reference validation --
validator.go:752
↓ 3 callers
Function
writeHash
(v any, h *maphash.Hash)
util.go:363
↓ 2 callers
Method
Add
Add specified json type. If typ is not valid json type it is ignored.
schema.go:200
↓ 2 callers
Method
AddErr
AddErr reports the given err. This is typically used to report the error created by subschema validation. NOTE that err must be of type *ValidationEr
vocab.go:93
↓ 2 callers
Method
Error
()
util.go:411
↓ 2 callers
Method
IsEmpty
()
schema.go:194
↓ 2 callers
Method
MustCompile
MustCompile is like [Compile] but panics if compilation fails. It simplifies safe initialization of global variables holding compiled schema.
compiler.go:169
↓ 2 callers
Method
String
()
schema.go:226
↓ 2 callers
Method
ToFile
ToFile is helper method to convert file url to file path.
loader.go:42
↓ 2 callers
Method
ToStrings
()
schema.go:212
↓ 2 callers
Function
absolute
(input string)
util.go:170
↓ 2 callers
Method
absoluteKeywordLocation
()
output.go:25
next →
1–100 of 377, ranked by callers