ChatJsonInputGuard class

Iteratively creates bounded defensive copies of JSON-compatible values.

One guard may copy several roots while sharing a single node and byte budget, which prevents an initialize response from multiplying the limit across capabilities, authentication methods, and agent metadata. Do not reuse a guard after any copy throws: failed operations may leave its internal node and byte counters partially advanced.

Constructors

ChatJsonInputGuard({required String resource, required int maxDepth, required int maxNodes, required int maxBytes})

Properties

hashCode → int
The hash code for this object.
no setterinherited
maxBytes → int
final
maxDepth → int
final
maxNodes → int
final
resource → String
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyList(Object? source, {String? rootElementObjectError}) → List
copyMap(Object? source) → Map<String, dynamic>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited