Hi Andrey,
Thanks for your reply.
I have just check this solution, and it is correct.
Why this works? I think because we add the JBossBrooklynServiceTag like a TAG.MAP which is a implicit tag. So the representer (by default) builds the scalar (Represent.representData(Object o)), but it is not added the TAG, or in any case JBossBrooklynServiceTag is substituted by TAG.MAP, and it is not dumped. am I wrong? ( I am not sure of this is the process to dump the YAML).
In any case I have a new problem. When the scalar of a node object is build, compare the name of the class of the current object with the class which have a TagClass (in my example org.tomat.translate.brooklyn.entity.JBossBrooklynService). If the current class has the same name that org.tomat.translate.brooklyn.entity.JBossBrooklynService, the TAG is changed using a implicit tag.
If I am not wrong, I will not be able to add a hierarchy class to avoid the implicit TAGs, e.g:
JBossBrooklynService and TomcatBrooklynService extend the same super class, JavaWebApplicationServer.
In this case, I would like add any something
skipEmptyAndNullRepresenter.addClassTag(Class<? extends org.tommat.translate.brooklyn.entity. JavaWebApplicationServer>, Tag.Map);
However, I do not find wat to accomplish this task.
Best,
Jose.