Module jakarta.json
Package jakarta.json

Interface JsonWriterFactory


public interface JsonWriterFactory
Factory to create JsonWriter instances. If a factory instance is configured with some configuration, that would be used to configure the created writer instances.

JsonWriter can also be created using Json's createWriter methods. If multiple writer instances are created, then creating them using a writer factory is preferred.

For example:

 
 JsonWriterFactory factory = Json.createWriterFactory(...);
 JsonWriter writer1 = factory.createWriter(...);
 JsonWriter writer2 = factory.createWriter(...);
 
 

All the methods in this class are safe for use by multiple concurrent threads.