{"record":{"id":"2b4e72ad59950185","repo":"weaviate/weaviate","slug":"unknown-data-type-arrayeach-v","errorCode":null,"errorMessage":"unknown data type ArrayEach %v","messagePattern":"unknown data type ArrayEach (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"entities/storobj/storage_object.go","lineNumber":1446,"sourceCode":"\t\t\t\t\tvar val interface{}\n\n\t\t\t\t\tswitch innerDataType {\n\t\t\t\t\tcase jsonparser.Number, jsonparser.String, jsonparser.Boolean:\n\t\t\t\t\t\tval, err = parseValues(innerDataType, innerValue)\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\treturnError = err\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\tcase jsonparser.Object:\n\t\t\t\t\t\tnestedProps := map[string]interface{}{}\n\t\t\t\t\t\terr := json.Unmarshal(innerValue, &nestedProps)\n\t\t\t\t\t\tif err != nil {\n\t\t\t\t\t\t\treturnError = err\n\t\t\t\t\t\t\treturn\n\t\t\t\t\t\t}\n\t\t\t\t\t\tval = nestedProps\n\t\t\t\t\tdefault:\n\t\t\t\t\t\treturnError = fmt.Errorf(\"unknown data type ArrayEach %v\", innerDataType)\n\t\t\t\t\t\treturn\n\t\t\t\t\t}\n\t\t\t\t\tarray = append(array, val)\n\t\t\t\t})\n\t\t\t\tif err != nil {\n\t\t\t\t\treturnError = err\n\t\t\t\t}\n\t\t\t\tproperties[propertyName] = array\n\n\t\t\t}\n\t\tcase jsonparser.Object:\n\t\t\t// nested objects and geo-props and phonenumbers.\n\t\t\t//\n\t\t\t// we do not have the schema for nested object and cannot use the efficient jsonparser for them\n\t\t\t//  (we could for phonenumbers and geo-props but they are not worth the effort)\n\t\t\t// however this part is only called if\n\t\t\t// - one of the datatypes is present\n\t\t\t// - AND the user requests them","sourceCodeStart":1428,"sourceCodeEnd":1464,"githubUrl":"https://github.com/weaviate/weaviate/blob/75aa4b6d11f8818305aafd4440b4e32794f7ca04/entities/storobj/storage_object.go#L1428-L1464","documentation":"When unmarshalling an array-valued property, each element's value type is switch-dispatched; only Number, String, Boolean, and Object elements are supported. If an array element has any other jsonparser type (e.g. Null or a nested Array), the parser returns \"unknown data type ArrayEach\". Nested arrays inside array properties are not supported by this fast-path parser.","triggerScenarios":"Reading an object whose property is an array containing a nested array or a null element, e.g. {\"tags\": [[\"a\",\"b\"]] } or {\"nums\": [1, null, 2]}, when that property is requested in propertyPaths.","commonSituations":"Clients importing nested arrays (e.g. matrix data) or arrays with nulls into a property, then querying the property back; cross-language clients (e.g. JS sending null in arrays).","solutions":["Flatten nested arrays into supported shapes (arrays of primitives or objects) before import","Replace null elements with a sentinel value or omit them from arrays","Store nested-array data as a JSON string or in a nested object property instead"],"exampleFix":"// before\n{\"matrix\": [[1,2],[3,4]]}\n// after\n{\"matrix\": [{\"row\": [1,2]}, {\"row\": [3,4]}]}","handlingStrategy":"validation","validationCode":"func hasOnlySupportedArrayElements(arr []interface{}) bool {\n    for _, el := range arr {\n        switch el.(type) {\n        case nil: // null and nested arrays unsupported\n            return false\n        case []interface{}:\n            return false\n        }\n    }\n    return true\n}","typeGuard":null,"tryCatchPattern":"if err != nil && strings.Contains(err.Error(), \"unknown data type ArrayEach\") {\n    // reshape the property (flatten/nulls removed) and re-import\n}","preventionTips":["Never store nested arrays or nulls in array-typed properties","Add client-side schema validation before import"],"tags":["json","deserialization","unsupported-type","array","weaviate"],"backgroundTag":"unsupported-property-type","analyzedSha":"75aa4b6d11f8818305aafd4440b4e32794f7ca04","analyzedAt":"2026-09-04T14:58:20.392Z","contentChangedAt":"2026-09-04T14:58:20.392Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}