Package dev.comfast.experimental.config
Class MapFlatter
java.lang.Object
dev.comfast.experimental.config.MapFlatter
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
MapFlatter
public MapFlatter()
-
-
Method Details
-
flat
- Parameters:
map- multi-level map- Returns:
- single level map, where: - keys are dot.notated.strings - values are strings - lists are represented by [i] notation eg. obj.list[2].nested eg. convert this: {obj:{a: 1, b: {c: "xd"}, list: [7, 8, 9]}, other: "lol" } into this: { obj.a: "1", obj.b.c: "xd", obj.list[0]: "7", obj.list[1]: "8", obj.list[2]: "9", other: "lol" }
-