create
Creates a Mokksy instance with Jackson and a custom ObjectMapper configuration, binding to "127.0.0.1" on a random port.
This overload exists so Java callers can pass a mapper callback without specifying host/port/verbose. It delegates to create with default host, port, and verbosity:
Mokksy mokksy = MokksyJackson.create(ObjectMapper::findAndRegisterModules).start();Return
A new, not-yet-started Mokksy instance.
Parameters
Callback to customise the ObjectMapper used by Ktor.
Throws
if ktor-serialization-jackson is not on the runtime classpath.
Creates a Mokksy instance with Jackson configured for JSON content negotiation.
The server is not started automatically. Chain with Mokksy.start:
Mokksy mokksy = MokksyJackson.create().start();Return
A new, not-yet-started Mokksy instance.
Parameters
Network interface to bind to. Defaults to "127.0.0.1".
Port to bind to. Defaults to 0 (OS-assigned ephemeral port).
Enables DEBUG-level request/response logging. Defaults to false.
Optional callback to customise the ObjectMapper used by Ktor, e.g. mapper -> mapper.findAndRegisterModules(). Defaults to a no-op.
Throws
if ktor-serialization-jackson is not on the runtime classpath.