private static ObjectMapper createDefaultObjectMapper() {
        ObjectMapper mapper = new ObjectMapper()
                // since version 4.32.0; pretty print by default (can be overridden by supplying explicit mapper)
                .enable(SerializationFeature.INDENT_OUTPUT);
        mapper.getSerializationConfig()
                // since version 4.21.0
                .with(JsonWriteFeature.WRITE_NUMBERS_AS_STRINGS);
        // since version 4.25.0; as the above doesn't always work
        mapper.setNodeFactory(JsonNodeFactory.withExactBigDecimals(true));

        return mapper;
    }
Instantiate an ObjectMapper to be used in case no specific instance is provided in constructor.

@return default ObjectMapper instance
jsonschema-generator/src/main/java/com/github/victools/jsonschema/generator/SchemaGeneratorConfigBuilder.java