-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
69 additions
and
112 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
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
15 changes: 0 additions & 15 deletions
15
src/main/groovy/gg/xp/xivgear/dataapi/serialization/CapitalizedPropertyNamingStrategy.groovy
This file was deleted.
Oops, something went wrong.
54 changes: 0 additions & 54 deletions
54
src/main/groovy/gg/xp/xivgear/dataapi/serialization/CustomObjectMapperFactory.groovy
This file was deleted.
Oops, something went wrong.
32 changes: 32 additions & 0 deletions
32
src/main/groovy/gg/xp/xivgear/dataapi/serialization/JacksonExtras.groovy
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,32 @@ | ||
package gg.xp.xivgear.dataapi.serialization | ||
|
||
import com.fasterxml.jackson.annotation.JsonInclude | ||
import com.fasterxml.jackson.databind.ObjectMapper | ||
import com.fasterxml.jackson.datatype.jdk8.Jdk8Module | ||
import io.micronaut.context.annotation.Context | ||
import io.micronaut.context.annotation.Factory | ||
import io.micronaut.context.annotation.Primary | ||
import io.micronaut.context.annotation.Replaces | ||
import io.micronaut.jackson.databind.JacksonDatabindMapper | ||
import io.micronaut.json.JsonMapper | ||
import jakarta.inject.Inject | ||
import jakarta.inject.Singleton | ||
|
||
@Factory | ||
@Context | ||
class JacksonExtras { | ||
|
||
@Inject | ||
void customize(ObjectMapper mapper) { | ||
// mapper.setPropertyNamingStrategy(new CapitalizedPropertyNamingStrategy()) | ||
mapper.setSerializationInclusion(JsonInclude.Include.ALWAYS) | ||
mapper.registerModule(new Jdk8Module()) | ||
} | ||
|
||
@Singleton | ||
@Primary | ||
@Replaces(JsonMapper) | ||
JsonMapper jsonMapper(JacksonDatabindMapper mapper) { | ||
return mapper | ||
} | ||
} |
17 changes: 0 additions & 17 deletions
17
src/main/groovy/gg/xp/xivgear/dataapi/util/JacksonCodecFactory.java
This file was deleted.
Oops, something went wrong.