class

Crowbar::Selectors::JSONKeyPath

Inherits Crowbar::Selector < Reference < Object

Selects values or keys associated with a specific key name inside JSON text. Operates directly on byte offsets to support targeted AST mutations.

Constructors

new(key : String, target_value : Bool = true, weight : Float64 = 1.0)
Source

Instance methods

select(buffer : Buffer) : Array(Tuple(Int32, Int32))

Returns an array of target ranges {start_index, end_index_exclusive}

Source
target_value?
Source