setJsonParserFactory method

void setJsonParserFactory(
  1. JsonParserFactory factory
)

Sets a custom JSON parser factory to create JsonParser instances from raw JSON strings.

If not set, the mapper falls back to the default StringJsonParser.

Example

objectMapper.setJsonParserFactory((content) => MyCustomJsonParser(content));

Implementation

void setJsonParserFactory(JsonParserFactory factory) {
  _jsonParserFactory = factory;
}