spry_json 0.0.1
spry_json: ^0.0.1 copied to clipboard
Spry JSON middleware and request/response extension, used to convert request body to JSON object or set response body to JSON object.
example/main.dart
import 'package:spry/spry.dart';
import 'package:spry_json/spry_json.dart';
void main() {
final Spry spry = Spry();
handler(Context context) {
context.response.json({'foo': 'bar'});
}
spry.listen(handler, port: 3000);
print('Listening on http://localhost:3000');
}