Results for “Structured data & serialization”
Small, practical examples. Search by task or narrow things down below.
Declare a preferred canonical URL
HTML: A canonical link identifies the preferred public URL for duplicate representations of a document.
HTML✓ Tested
Declare an indexing preference for a draft page
HTML: A robots meta element can request noindex while allowing link following.
HTML✓ Tested
Decode a 16-bit big-endian integer
C: Promote bytes to an unsigned integer type before combining shifted values.
C✓ Tested
Decode a form query parameter
Java: URLDecoder reverses form encoding and treats plus as a space.
Java✓ Tested
Decode a validated pair of hexadecimal digits
C: Convert each nibble and reject a nonhexadecimal character before combining them.
C✓ Tested
Decode bytes as validated UTF-8
Decode bytes as validated UTF-8 in a complete Rust program using the standard library.
Rust✓ Tested
Define behavior with a trait
Define behavior with a trait in a complete Rust program using the standard library.
Rust✓ Tested
Delete a known temporary file if present
Java: deleteIfExists returns whether a file was removed and still reports other I/O errors.
Java✓ Tested
Derive comparison and debugging behavior
Derive comparison and debugging behavior in a complete Rust program using the standard library.
Rust✓ Tested
Distinguish current state from initial markup
jQuery: prop reads the live checked state; attr reads the original checked attribute.
jQuery✓ Tested
Encode a byte buffer as hexadecimal
C: Format each byte as an unsigned two-digit hexadecimal value.
C✓ Tested
Encode a form query parameter
Java: URLEncoder uses application/x-www-form-urlencoded rules, including plus signs for spaces.
Java✓ Tested