Module jakarta.json

Interface JsonParserFactory


public interface JsonParserFactory
Factory for creating JsonParser instances. If a factory instance is configured with a configuration, the configuration applies to all parser instances created using that factory instance.

The class Json also provides methods to create JsonParser instances, but using JsonParserFactory is preferred when creating multiple parser instances as shown in the following example:

 
 JsonParserFactory factory = Json.createParserFactory();
 JsonParser parser1 = factory.createParser(...);
 JsonParser parser2 = factory.createParser(...);
 
 

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