module

Hwaro::Utils::FrontmatterScanner

Instance methods

find_json_end(content : String) : Int32 | Nil

Returns the end offset (exclusive) of the first balanced top-level JSON object at byte 0 of content, or nil if the input does not start with { or the braces never balance. Tracks string-literal state so braces inside quoted strings are ignored.

Source