How to convert integer to string in yaml. I have seen simply need to put quote . But not working. Still getting value as integer
Asked
Active
Viewed 7,430 times
0
-
2Please provide your sample yaml and sample program you are using to read it. – mukesh210 Jan 07 '19 at 10:21
-
id: abcd unit: m tagData: 1543626000055 tagData1: 3456 – anu Jan 07 '19 at 10:23
-
Here tagData1 value need to be string – anu Jan 07 '19 at 10:24
-
2Did you try: tagData1: "3456" ? It should work fine. – mukesh210 Jan 07 '19 at 10:25
-
Possible duplicate of [Do I need quotes for strings in YAML?](https://stackoverflow.com/questions/19109912/do-i-need-quotes-for-strings-in-yaml) – mukesh210 Jan 07 '19 at 10:26
-
I tried double quotes and single quotes also . Its not working – anu Jan 07 '19 at 10:29
-
Before doing anything else read through the [tour], completely. This question is low quality as several parts are missing to reproduce your issue. You should edit your question (as asked in a comment), to include your YAML input. Do not put such missing information in a comment: **improve your question** instead. How do you check that the scalar is a string or not? (It is working, you are just doing something wrong, or using the wrong software to load the YAML file, but without a complete reproducible discription in your question, we cannot help you). – Anthon Jan 07 '19 at 10:57
-
I voted to close this question, but will retract my vote when I notice significant enough improvements to the question have been made. – Anthon Jan 07 '19 at 10:59