Backend API. Server-side code: this runs in a Codename One backend, not in the app on the device.
public interface Json.Writable
A value that knows how to write itself as JSON.
The point of this interface is to let generated code skip the Map. A codec emitted by the annotation processor knows its field names and types at build time, so it can write straight into the sink; without somewhere to hang that, a handler’s return value has to become a LinkedHashMap first and be walked back with instanceof dispatch per value. Measured on the benchmark’s one-field object, just removing the per-request map was worth 22%.
Methods
public abstract void writeTo(ByteSink out) |
Method details
writeTo
public abstract void writeTo(ByteSink out)