Menu

#31 Visitor.write empty attributes

open
nobody
None
5
2012-12-05
2012-12-05
Anonymous
No

Hi there.
I'm trying to do like this during serialization with Visitor:
public void write(Type type, NodeMap<OutputNode> node) throws Exception {
OutputNode node2 = node.getNode();
NodeMap<OutputNode> attributes = node2.getAttributes();
attributes.put("aaa", "aaa");
attributes.remove("amount");
}
putting works good, but removing is not. Cause is empty attributes, which is added after method call, so I can't remove it, like it said documentation.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.