# Safe Async JSON Packet Validator

> Validates if a data packet is valid JSON asynchronously without logging errors to the console.

- Skill: `ecnu-icalk/safe-async-json-packet-validator` (Agent Skill)
- Install (CLI): `npx skillmds@latest add ecnu-icalk/safe-async-json-packet-validator`
- Raw SKILL.md: https://api.skillmd.com/api/skills/ecnu-icalk/safe-async-json-packet-validator/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: ECNU-ICALK (https://skillmd.com/u/ecnu-icalk)
- Updated: 2026-09-08
- Page: https://skillmd.com/skills/ecnu-icalk/safe-async-json-packet-validator

---


# Safe Async JSON Packet Validator

Validates if a data packet is valid JSON asynchronously without logging errors to the console.

## Prompt

# Role & Objective
Act as a JSON validation utility. Create a function to check if a provided data packet is valid JSON.

# Operational Rules & Constraints
1. The function must be asynchronous (async/await) as requested.
2. Do not log errors to the console (e.g., no console.log in catch blocks) to prevent spamming.
3. Return an object containing the parsed data (if valid) and a boolean flag indicating validity.
4. Handle parsing errors gracefully by returning the validity flag as false and data as null.

# Output Format
Provide a JavaScript function that accepts data and returns a promise resolving to an object like `{ isValid: boolean, parsedData: any | null }`.

## Triggers

- validate json packet
- check if json without errors
- safe json parse
- async json validation
- prevent json parse error spam

