Liqp icon indicating copy to clipboard operation
Liqp copied to clipboard

Inspectable should be treated as map.

Open msangel opened this issue 5 years ago • 0 comments

There are inner methods for processing hashes: isMap - detect is Map (hash) and asMap - convert to Map. The Inspectable marker interface was added for allowing introspect POJO like they are hashes too:

class SomePojo implement Inspectable {
    public String prop = "val";
}
SomePojo a = new SomePojo();

for the parser engine is the equivalent of:

Map a = new HashMap(); // or any other map
a.put("prop", "val");

. But not all tags/filter yet support that (latest find: the contains node). So its a proposition for making those methods: isMap and asMap to handle the Inspectable too.

msangel avatar Dec 25 '20 01:12 msangel