FIND YOUR NEXT FEW LINES

Results for “json_valid”

Small, practical examples. Search by task or narrow things down below.

247 snippets foundClear filters
HTMLInput constraints

Validate the shape of an absolute URL

HTML: A URL input checks syntax, not whether a resource exists or is safe.

HTML✓ Tested
GoErrors & validation

Validate UTF-8 bytes

Validate UTF-8 bytes using a complete Go program with explicit sample inputs.

Go✓ Tested
PythonJSON & CSV

Write a JSON file

Save a dictionary as readable, indented JSON while preserving Unicode characters.

json✓ Tested
PowerShellFunctions & parameter validation

Accept one typed value at a time from a pipeline

PowerShell: An advanced function uses process to handle each pipeline item.

PowerShell✓ Tested
PowerShellFunctions & parameter validation

Accumulate pipeline input across begin process and end

PowerShell: Keep initialization and final output separate from per-item work.

PowerShell✓ Tested
PythonText validation & encoding

Build a URL query string

Python: Use urlencode to percent-encode query parameter values correctly.

Python✓ Tested
JavaText validation & formatting

Build text efficiently in a loop

Java: Append to StringBuilder when constructing a string incrementally.

Java✓ Tested
C#Text validation & encoding

Build text incrementally with StringBuilder

C#: Append fragments instead of repeatedly concatenating intermediate strings in a loop.

C#✓ Tested
JavaScriptNumbers & numeric validation

Calculate a page count with ceiling division

JavaScript: Use Math.ceil for a nonnegative item count and a positive page size.

JavaScript✓ Tested
TypeScriptNumbers & numeric validation

Calculate a page count with ceiling division

TypeScript: Use Math.ceil for a nonnegative item count and a positive page size.

TypeScript✓ Tested
GoJSON & encoding

Calculate a SHA-256 text digest

Calculate a SHA-256 text digest using a complete Go program with explicit sample inputs.

Go✓ Tested
JavaScriptNumbers & numeric validation

Calculate integers beyond Number’s precise range

JavaScript: Use BigInt operands together to avoid precision loss.

JavaScript✓ Tested