FIND YOUR NEXT FEW LINES

Results for “JSON & binary formats”

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

123 snippets foundClear filters
JavaFile operations & binary data

Normalize relative path components

Java: Path.normalize removes redundant dot components without accessing the filesystem.

Java✓ Tested
Arduino / CBinary values & packets

Pack two small values into one byte

Arduino / C: Mask each four-bit value before combining it.

Arduino / C✓ Tested
JavaFile operations & binary data

Process a text file one line at a time

Java: Use a buffered reader to avoid loading a large file into memory.

Java✓ Tested
JavaFile operations & binary data

Read a file length in bytes

Java: Files.size inspects metadata without loading the file into a Java string.

Java✓ Tested
PowerShellStructured formats & encodings

Read a tab-separated table

PowerShell: ConvertFrom-Csv accepts an explicit delimiter instead of requiring comma-separated input.

PowerShell✓ Tested
PowerShellStructured formats & encodings

Read a value from a trusted XML document

PowerShell: The XML adapter exposes a small document’s elements and attributes through named properties.

PowerShell✓ Tested
GoJSON & encoding

Read quoted CSV fields

Read quoted CSV fields using a complete Go program with explicit sample inputs.

Go✓ Tested
Arduino / CBinary values & packets

Require every bit in a mask

Arduino / C: Masking followed by equality tests whether all required flags are set.

Arduino / C✓ Tested
C#Collections & data structures

Search a sorted array efficiently

C#: Array.BinarySearch requires an array sorted with the same comparison rules.

C#✓ Tested
CArray transformations

Search a sorted array with bsearch

C: The search uses the same ordering comparator as the sorted input.

C✓ Tested
RustVectors & slices

Search a sorted slice

Search a sorted slice in a complete Rust program using the standard library.

Rust✓ Tested
C++Numbers & algorithms

Search a sorted vector

Use binary_search after ensuring C++ values are sorted.

C++✓ Tested