MCPcopy Create free account
hub / github.com/AI45Lab/Code / find_balanced_json_object

Function find_balanced_json_object

core/src/llm/structured.rs:361–363  ·  view source on GitHub ↗

Find the first balanced `{...}` substring using bracket counting.

(text: &str)

Source from the content-addressed store, hash-verified

359
360/// Find the first balanced `{...}` substring using bracket counting.
361fn find_balanced_json_object(text: &str) -> Option<&str> {
362 find_balanced(text, '{', '}')
363}
364
365/// Find the first balanced `[...]` substring.
366fn find_balanced_json_array(text: &str) -> Option<&str> {

Callers 1

extract_json_valueFunction · 0.85

Calls 1

find_balancedFunction · 0.85

Tested by

no test coverage detected