最上層的資料結構必須是 object
或是 array
不可以有其他 number
, string
, boolean
的格式
canner.schema.js
1 2 3 4 5 6 7 8 9 10 11 12 13
const user = CannerTypes.object({ name: CannerTypes.string().title('name') }); const info = CannerTypes.object({ address: CannerTypes.object().ui('map').title('address') }); module.exports = { user, // 第一層,一定要是 object or array info // 第一層,一定要是 object or array }
在不同的平台,建立資料結構時可能會有不同的 data 架構。