metadata
language:
- en
task_categories:
- text-classification
- token-classification
tags:
- json
- validation
- semantic-errors
- synthetic-data
size_categories:
- n<1K
JSON SemVal Synthetic v1
Synthetic JSON+Schema corruptions for semantic validation training.
Dataset Description
This dataset contains synthetically generated JSON payloads with controlled semantic errors for training ML models to detect and fix JSON validation issues.
Dataset Structure
Each example in the dataset contains:
schema: JSON Schema definitionclean_json: Valid JSON payload conforming to the schemacorrupt_json: Corrupted JSON with semantic errorserror_type: Type of error introduced (e.g., type_mismatch, format_violation, enum_violation)jsonpath: JSONPath to the location of the errorfix_action: Suggested fix action (e.g., cast_number, parse_date_iso, map_enum)
Error Types
type_mismatch- Wrong data type (e.g., string instead of integer)format_violation- Invalid format (e.g., bad date format)enum_violation- Invalid enum valuemissing_required- Missing required fieldextra_property- Unexpected additional propertyrange_violation- Value outside allowed rangepattern_violation- String doesn't match regex pattern
Data Splits
- Train: 30 examples
- Test: 10 examples
Usage
from datasets import load_dataset
dataset = load_dataset("thearnabsarkar/json-semval-synth-v1")
# Access train split
train_data = dataset["train"]
# Example usage
for example in train_data:
print(f"Error type: {example['error_type']}")
print(f"JSONPath: {example['jsonpath']}")
print(f"Fix action: {example['fix_action']}")
Dataset Creation
This dataset was generated using the JSON Semantic Validator's synthetic data generation pipeline, which:
- Generates diverse JSON schemas
- Creates valid JSON payloads
- Introduces controlled corruptions
- Labels each corruption with error type and location
License
MIT
Citation
If you use this dataset, please cite:
@misc{json-semval-synth-v1,
author = {Arnab Sarkar},
title = {JSON SemVal Synthetic v1},
year = {2025},
publisher = {Hugging Face},
url = {https://huggingface.co/datasets/thearnabsarkar/json-semval-synth-v1}
}
Related Resources
- Model: thearnabsarkar/json-semval-minilm-v1 (coming soon)
- Space: thearnabsarkar/json-semantic-validator (coming soon)
- Code: GitHub Repository (if applicable)