Last active
August 29, 2015 14:08
-
-
Save danielnorberg/088cf109a65828f678eb to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| Foobar foobar = new FoobarBuilder() | |
| .someFooThing(17) | |
| .aBarField("hello world") | |
| .build(); | |
| String json = mapper.writeValueAsString(foobar); | |
| out.println(json); |
This file contains hidden or 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
| { | |
| "some_foo_thing": 17, | |
| "a_bar_field": "hello world" | |
| } |
This file contains hidden or 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
| ObjectMapper mapper = new ObjectMapper() | |
| .registerModule(new AutoMatterModule(CAMEL_CASE_TO_LOWER_CASE_WITH_UNDERSCORES)); | |
This file contains hidden or 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
| @AutoMatter(json = LOWER_CASE_WITH_UNDERSCORES) | |
| public interface Foobar { | |
| int someFooThing(); | |
| String aBarField(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment