Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Transform a JSON object to a map
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
You can’t perform that action at this time.