JsonBinding class

A class that handles JSON binding and validation for incoming requests.

Inheritance

Constructors

JsonBinding()

Properties

hashCode int
The hash code for this object.
no setterinherited
mimeType MimeType
The MIME type associated with this binding.
no setteroverride
name String
The name of the binding, which is 'json'.
no setteroverride
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

bind<T>(EngineContext context, T instance, {Map<String, String>? rules}) Future<T>
Binds the JSON body of the request to an instance.
override
bindBody(Map<String, dynamic> decoded, dynamic instance) Future<void>
Binds the decoded JSON body to an instance.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited
validate(EngineContext context, Map<String, String> rules, {bool bail = false, Map<String, String>? messages}) Future<void>
Validates the JSON body of the request against a set of rules.
override

Operators

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