basic

command
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: MIT Imports: 3 Imported by: 0

README

Basic Example

Simple JSON Schema validation using maps.

What it shows

  • Compile a schema
  • Validate data
  • Handle validation errors

Run

go run main.go

Output

✅ Valid data passed
❌ Invalid data failed:
  - name: [Value should be at least 2 characters long]
  - age: [Value should be at least 0]

Documentation

Overview

Package main demonstrates basic usage of the jsonschema library.

Jump to

Keyboard shortcuts

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