JsonRemedy.Layer3.BinaryProcessors (json_remedy v0.1.3)
View SourceBinary pattern matching optimization functions for Layer 3 syntax normalization.
Contains optimized binary processing functions that eliminate String.at/2 calls for maximum performance.
Summary
Functions
Check if there's more content after an identifier that should be part of an unquoted value. This handles cases like "Weiss Savage" where there are spaces between words.
Binary pattern matching for identifier consumption - UTF-8 safe.
Binary pattern matching for number consumption.
Consume an unquoted value until the next JSON delimiter. This handles unquoted string values that may contain spaces.
Determine expecting state after closing delimiters.
Determine next expecting state after simple transitions.
Process identifiers with binary pattern matching.
Process numbers with binary pattern matching.
Functions
@spec check_for_multi_word_value(binary(), String.t()) :: {String.t(), binary(), non_neg_integer()}
Check if there's more content after an identifier that should be part of an unquoted value. This handles cases like "Weiss Savage" where there are spaces between words.
@spec consume_identifier_binary_simple(binary()) :: {String.t(), binary(), non_neg_integer()}
Binary pattern matching for identifier consumption - UTF-8 safe.
@spec consume_number_binary_simple(binary()) :: {String.t(), binary(), non_neg_integer()}
Binary pattern matching for number consumption.
@spec consume_unquoted_value_binary_simple(binary(), binary(), non_neg_integer()) :: {String.t(), binary(), non_neg_integer()}
Consume an unquoted value until the next JSON delimiter. This handles unquoted string values that may contain spaces.
Determine expecting state after closing delimiters.
Determine next expecting state after simple transitions.
@spec process_identifier_binary_simple( binary(), iolist(), list(), boolean(), boolean(), String.t() | nil, list(), atom(), non_neg_integer() ) :: {binary(), iolist(), list(), boolean(), boolean(), String.t() | nil, list(), atom(), non_neg_integer()}
Process identifiers with binary pattern matching.
@spec process_number_binary_simple( binary(), iolist(), list(), boolean(), boolean(), String.t() | nil, list(), atom(), non_neg_integer() ) :: {binary(), iolist(), list(), boolean(), boolean(), String.t() | nil, list(), atom(), non_neg_integer()}
Process numbers with binary pattern matching.