Results for “JSON_VALUE”
Small, practical examples. Search by task or narrow things down below.
Use a switch expression to classify a value
C#: Relational patterns express a small ordered range classification.
C#✓ Tested
Use an alternate value only when a variable is nonempty
Bash Scripts: The colon-plus expansion returns its word only when the parameter has a nonempty value.
Bash Scripts✓ Tested
Use if to produce a value
Use if to produce a value in a complete Rust program using the standard library.
Rust✓ Tested
Validate a finite numeric value without coercion
JavaScript: Number.isFinite rejects numeric strings as well as NaN and infinity.
JavaScript✓ Tested
Validate a finite numeric value without coercion
TypeScript: Number.isFinite rejects numeric strings as well as NaN and infinity.
TypeScript✓ Tested
Wait for several deferred values
jQuery: when resolves only after every supplied deferred has resolved.
jQuery✓ Tested
Wrap a value in a distinct type
Wrap a value in a distinct type in a complete Rust program using the standard library.
Rust✓ Tested
Write a JSON file
Save a dictionary as readable, indented JSON while preserving Unicode characters.
json✓ Tested
Yield values on demand
Python: Use a generator to produce a sequence without storing all intermediate values.
Python✓ Tested
Add context to a parsing failure
Add context to a parsing failure in a complete Rust program using the standard library.
Rust✓ Tested
Assign a bit from a Boolean state
Arduino / C: bitWrite accepts a bit position and a zero or nonzero value.
Arduino / C✓ Tested
Build a minimum-priority queue
C++: Supply greater as the comparator because priority_queue defaults to the largest value first.
C++✓ Tested