Example string of type integer gets pasted as int
See original GitHub issueWhen I use autocompletion I get a nice suggestion to use '1'
(so obviously this entry in examples is a string), but after selecting it it ends up as 1
, giving me an error as the validation spec expects a string.
Maybe this is a vscode problem, but I am reporting here first.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (3 by maintainers)
Top Results From Across the Web
Java String to Int – How to Convert a String to an Integer
This method returns the string as a primitive type int. ... Let's consider an example of converting a string to an int using...
Read more >How to convert string to int in C#? - TutorialsTeacher
In C#, you can convert a string representation of a number to an integer using the following ways: Parse() method. Convert class.
Read more >How To Convert Java String To Int - Tutorial With Examples
This tutorial explains the ways to convert Java String to Integer using Integer.parseInt and Integer.ValueOf methods with code examples.
Read more >How do I convert a String to an int in Java? - Stack Overflow
For example, here are two ways: Integer x = Integer.valueOf ...
Read more >4 Ways to Convert String to Int in Java - YouTube
valueOf() method converts String into Integer object Other query related to this code: How to convert string to integer in java how to ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Yeah, that sounds good to me
@JPinkney I done some investigation on this, and found that YAML doesn’t have
number
type, it has only scalar type, i.e. for yaml point of view1
,'1'
,"1"
is represents same value(string witch contains ‘1’) in different flow scalar types I can change code completion to surround numbers, booleans andnull
values with"
in case if schema requires string but default value is other than string. Or I can improve schema validation, by adding type conventions, i.e. if scheme requires number but we parse string, we will try to convert that string to number and do rest validations.WDYT?