Skip to content
This repository has been archived by the owner on Jan 27, 2025. It is now read-only.

Commit

Permalink
Produce Value.Array for marked array entities. (#109)
Browse files Browse the repository at this point in the history
  • Loading branch information
blackwinter committed Jan 19, 2022
1 parent 1eaf09b commit a42943d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion metafix/src/main/java/org/metafacture/metafix/Metafix.java
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ public void startEntity(final String name) {
throw new IllegalArgumentException("Entity name must not be null.");
}

final Value value = Value.newHash();
final Value value = name.endsWith(ARRAY_MARKER) ? Value.newArray() : Value.newHash();
// TODO: Remove array marker? => name.substring(0, name.length() - ARRAY_MARKER.length());

addValue(name, value);
entities.add(value);

Expand Down

0 comments on commit a42943d

Please sign in to comment.