[英]What is type (like "object") in ERC721 Metadata JSON schema
根據標准,有如下所示的“對象”之類的type
。 這種type
有什么用途,我們還可以使用哪些其他類型? 我可以像“藝術”一樣使用嗎?
{
"title": "Asset Metadata",
"type": "object",
"properties": {
"name": {
"type": "string",
"description": "Identifies the asset to which this NFT represents"
},
"description": {
"type": "string",
"description": "Describes the asset to which this NFT represents"
},
"image": {
"type": "string",
"description": "A URI pointing to a resource with mime type image/* representing the asset to which this NFT represents. Consider making any images at a width between 320 and 1080 pixels and aspect ratio between 1.91:1 and 4:5 inclusive."
}
}
}
它是根據JSON Schema規范描述的項目的數據類型。 它也是用於其他開發領域的標准——不僅限於 NFT 或區塊鏈開發。
有一個默認允許的type
值列表: http://json-schema.org/understanding-json-schema/reference/type.html
可以在 JSON Schema 中創建自定義類型,但是“ERC-721 元數據文檔”文檔允許的有限 scope 不能有效地允許自定義類型。
TLDR:不能在“ERC-721 元數據文檔”中使用type: "art"
”。 可以在更大的 scope 中使用它(例如 REST 端點定義)。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.