To return JSON responses, you can simply return a JavaScript object from your route handler. Deepkit will automatically serialize the object to JSON and set the appropriate Content-Type header. If you specify a return type for your route handler, Deepkit will use this type to serialize the response (and omit anything not specified in this type).
Here's an example:
router.get('/', (): {message: string} => { return { message: 'Hello World' }; });
This will return the following JSON response:
{ "message": "Hello World" }