I'm trying to initialise a value in dictionary as follow,
var og:image: String
But after og:
it tries to assign the type considering og
as the variable to site_name, which is obviously wrong.
Is there a way to assign
og:image
as variable toString
type using special or escape characters?
In reference to this, apple does not provide any meaningful explanations to variable naming conventions in such a situation.
Edit-1:
Here is code snippet to clarify dictionary usage
is in JSON parsing data structure,
struct Metadata: Decodable{
var metatags : [enclosedTags]
}
struct enclosedTags: Decodable{
var image: String
var title: String
var description: String
var og:site_name: String
}