Cannot implicitly convert int to string
I'm trying to assign a variable to the "words" in the hashmap but for some reason apparently its an integer?
4 Replies
Where does this error happen?
As a side note, the
var kv in json["lines"]
looks curious. Are you manually parsing some JSON file you have? Line by line?
Or you could go offline the moment you ask the question, sureIg?
On string wordMap = lyricMap["words"] ;
Ah, well, makes sense it shows you this error
LyricMap is a dictionary where keys are strings and values are ints
If you get a value by the key...
...you get an int
I mentioned that, because
System.Text.Json
namespace exists and lets you parse json to a nice and proper classWait im actually at school I'll just take this in later ya
Okay I think I'll get it, I'll try to implement it another way
Ty