protected GsonJsonEngine createGsonJsonEngine ( JsonEngineResource resource ) { final boolean serializeNulls = isGsonSerializeNulls ( ) ; final boolean prettyPrinting = isGsonPrettyPrinting ( ) ; final Consumer < GsonBuilder > builderSetupper = prepareGsonBuilderSetupper ( serializeNulls , prettyPrinting ) ; final Consumer < JsonMappingOption > optionSetupper = prepareMappingOptionSetupper ( resource . getMappingOption ( ) ) ; return resource . getYourEngineCreator ( ) . map ( creator -> { // rare option return createYourEngine ( creator , builderSetupper , optionSetupper ) ; } ) . orElseGet ( ( ) -> { // mainly here return newGsonJsonEngine ( builderSetupper , optionSetupper ) ; } ) ; }
mappingOption is specified for another engine