Custom JSON converters: token boundaries, errors, and invariant formatting
Implement a converter that reads and writes exactly one JSON value, rejects incompatible input, and keeps invariant text formatting separate from JSON encoding.
CKTIS / Knowledge base
Programming syntax, operators and concepts. Find an explanation, explore an example and return to learning.
Implement a converter that reads and writes exactly one JSON value, rejects incompatible input, and keeps invariant text formatting separate from JSON encoding.
Environment.ExitCode: practical reference: Environment.ExitCode gets or sets the current process exit code returned to the operating system after normal termination.
abstract: practical reference: abstract marks an incomplete type or member that requires implementation in a derived class.
add: practical reference: add defines a custom event subscription accessor and receives the delegate as value.
alias: practical reference: alias is a contextual keyword only immediately after extern in extern alias; an ordinary using alias places an identifier before = and does not use the alias keyword.
and: practical reference: and combines logical patterns and matches when both patterns are satisfied.
ascending: practical reference: ascending explicitly selects increasing key order in a query orderby clause.
async: practical reference: async enables await; an async method may return void, Task, Task<T>, or a suitable task-like type such as ValueTask/ValueTask<T>, while an async iterator that produces a stream returns IAsyncEnumerable<T>.
base: practical reference: base refers to the implementation or constructor of the current object’s base class.
break: practical reference: break immediately terminates the nearest loop or switch section.
by: practical reference: by separates an element from its key in a query group ... by clause.
case: practical reference: case defines a value or pattern label in a switch statement.
catch: practical reference: catch captures an exception of a compatible type after a failed try.
checked: practical reference: checked enables overflow checking for covered integer operations and conversions.
class: practical reference: class declares a reference object type with single base-class inheritance.
const: practical reference: const declares a compile-time value that is embedded into consuming code.
continue: practical reference: continue skips the rest of the current iteration and proceeds to the next.
default: practical reference: default creates a type’s default value or the default switch label depending on context.
delegate: practical reference: delegate declares a callable signature type or creates an anonymous function.
descending: practical reference: descending selects decreasing key order in query orderby syntax.
do: practical reference: do executes its body before the first while-condition check.
else: practical reference: else selects the branch when its associated if condition is false.
enum: practical reference: enum declares a named set of constants backed by an integral type.
equals: practical reference: equals separates the outer key from the inner key in a query join.