How to control string quoting on a per-property basis? #453
-
We need to update two different YAM properties. For one, we would like to have it single-quoted when serialized. For the other, we would like it to not have quotes when serialized. Is it possible with this library to specify how a single property is serialized on stringify? |
Beta Was this translation helpful? Give feedback.
Answered by
robross0606
Mar 24, 2023
Replies: 1 comment 1 reply
-
I think I see how to do this now: const doc = new Document()
const firstProp = doc.createNode("hello")
firstProp.type = 'PLAIN'
doc.set('first', firstProp)
const secondProp= doc.createNode("world")
secondProp.type = 'QUOTE_DOUBLE'
doc.set('second', secondProp)
doc.toString() Is that correct? |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
robross0606
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think I see how to do this now:
Is that correct?