-
-
Save push-gists/91db08c027ef04bdd5c03f4b19540f03 to your computer and use it in GitHub Desktop.
Transform a JSON object to a map
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
final Transformer<Map<String, String>, JSON> transformer = Transformers.fromMap(); | |
final Map<String, String> keyValuePairs = new HashMap<>(); | |
keyValuePairs.put("aKey", "aValue"); | |
keyValuePairs.put("anotherKey", "anotherValue"); | |
final JSON json = transformer.transform(keyValuePairs); | |
updater.valueUpdater(JSON.class).update("a/topic", json, callback); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment