Skip to content

Commit

Permalink
rollback json
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosmarxm committed Jul 11, 2022
1 parent bf73e8d commit a3f481f
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -220,12 +220,9 @@ public static int getIntOrZero(final JsonNode json, final List<String> keys) {
}

/**
* Flattens an ObjectNode, or dumps it into a {null: value} map if it's not an object. When
* applyFlattenToArray is true, each element in the array will be one entry in the returned map.
* This behavior is used in the Redshift SUPER type. When it is false, the whole array will be one
* entry. This is used in the JobTracker.
* Flattens an ObjectNode, or dumps it into a {null: value} map if it's not an object.
*/
public static Map<String, Object> flatten(final JsonNode node, final boolean applyFlattenToArray) {
public static Map<String, Object> flatten(final JsonNode node) {
if (node.isObject()) {
final Map<String, Object> output = new HashMap<>();
for (final Iterator<Entry<String, JsonNode>> it = node.fields(); it.hasNext();) {
Expand Down

0 comments on commit a3f481f

Please sign in to comment.