You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
data := map[string]interface{}{
"title": "New Blog Post",
"content": "This is the content of the blog post...",
"publishedDate": "2023-08-25T15:00:00Z",
"author": map[string]interface{}{
"username": "authoruser",
"email": "[email protected]",
},
"tags": []string{"Technology", "Programming"},
}
Error:
"/tags"
"Value is unknown but should be array"
The text was updated successfully, but these errors were encountered:
I am getting the same error, because my type is map[interface {}]interface {}.
Update: Using go-yaml/yaml#139 I was able to get my same YAML to be type map[string]interface{} but the library fails to work because it gives no errors in ToList, however I get from .Error() -> evaluation failed. :(
I am getting the same error, because my type is map[interface {}]interface {}.
Update: Using go-yaml/yaml#139 I was able to get my same YAML to be type map[string]interface{} but the library fails to work because it gives no errors in ToList, however I get from .Error() -> evaluation failed. :(
I'm sorry to see this message just now, can you submit the wrong code completely? There is no problem after my test. If yaml is parsed into map[interface{}]interface{}, his error is "type": "Value is unknown but should be object"
I'm getting a validation error when using a
map[string]interface{}
as the value.Here's the example:
Json Schema
The data
Error:
"/tags"
"Value is unknown but should be array"
The text was updated successfully, but these errors were encountered: