-
-
Notifications
You must be signed in to change notification settings - Fork 403
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #649 from baulea/jsonPathJacksonProvider
introduce JsonPathJacksonProvider
- Loading branch information
Showing
13 changed files
with
160 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
37 changes: 37 additions & 0 deletions
37
core/src/main/java/org/jsmart/zerocode/core/di/provider/JsonPathJacksonProvider.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package org.jsmart.zerocode.core.di.provider; | ||
|
||
import com.jayway.jsonpath.Configuration; | ||
import com.jayway.jsonpath.Option; | ||
import com.jayway.jsonpath.spi.json.JacksonJsonProvider; | ||
import com.jayway.jsonpath.spi.json.JsonProvider; | ||
import com.jayway.jsonpath.spi.mapper.JacksonMappingProvider; | ||
import com.jayway.jsonpath.spi.mapper.MappingProvider; | ||
import jakarta.inject.Provider; | ||
import java.util.EnumSet; | ||
import java.util.Set; | ||
|
||
public class JsonPathJacksonProvider implements Provider<Configuration.Defaults> { | ||
@Override | ||
public Configuration.Defaults get() { | ||
return new Configuration.Defaults() { | ||
|
||
private final JsonProvider jsonProvider = new JacksonJsonProvider(); | ||
private final MappingProvider mappingProvider = new JacksonMappingProvider(); | ||
|
||
@Override | ||
public JsonProvider jsonProvider() { | ||
return jsonProvider; | ||
} | ||
|
||
@Override | ||
public MappingProvider mappingProvider() { | ||
return mappingProvider; | ||
} | ||
|
||
@Override | ||
public Set<Option> options() { | ||
return EnumSet.noneOf(Option.class); | ||
} | ||
}; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.