Custom Anchor Names During Serilialize? #744
-
Is there a way to customize the name of an anchor during serialization? I can easily output a custom AnchorAlias using a type converter (e.g. "*custom_anchor_name"), but not the anchor for the originating object (e.g. "&custom_anchor_name"). None of the ways I've come up with of doing it seem to output it properly, and I was hoping to have names that were easier to reference than the default generated ones. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 3 replies
-
I am having the same issue and looking for a resolution. Did you find any way to get this done. |
Beta Was this translation helpful? Give feedback.
-
That sounds like what I saw. When I have time the way I was planning to
implement it is to create a custom attribute the library would read called
[YamlAnchor].
Good luck, sorry I haven’t gotten around to it myself yet!
…On Tue, May 23, 2023 at 10:58 PM Nidhi1819 ***@***.***> wrote:
Thanks @BBoldenow-Alt <https://github.com/BBoldenow-Alt> , hope there was
better way to do this rather than customizing the library. I tried
implementing IYamlTypeConverter and it did generate custom names for anchor
tag but it did *not* generate alias for repeated objects. Looks like will
have to override the complete behavior to achieve what I want but since I
do not know how library works it is difficult to change.
—
Reply to this email directly, view it on GitHub
<#744 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/A2WPPK2KWLUNQZ5PGOIOVZLXHWIRBANCNFSM6AAAAAASDX4NYA>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Take a look at my suggestion #807 |
Beta Was this translation helpful? Give feedback.
Take a look at my suggestion #807