首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >NFT元数据:有多行描述

NFT元数据:有多行描述
EN

Stack Overflow用户
提问于 2022-10-07 03:23:28
回答 1查看 95关注 0票数 0

作为NFT的元数据json的描述,有可能有多行单词吗?我在互联网上浏览了几个例子,它们都只使用了一行,比如来自NFTSchool的这一行:

代码语言:javascript
复制
{
    "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."
        }
    }
}

这个例子的描述:

代码语言:javascript
复制
Describes the asset to which this NFT represents

有可能有这样的东西可以改变像Opensea和Rarible这样的市场吗?(下面的示例应该有三行描述)

代码语言:javascript
复制
{
    "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\nDescribes the asset to which this NFT represents\nDescribes 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."
        }
    }
}

这个例子是想要的描述:

代码语言:javascript
复制
Describes the asset to which this NFT represents
Describes the asset to which this NFT represents
Describes the asset to which this NFT represents
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2022-10-21 05:33:09

\n可以让这些描述在Opensea上改变行。还没有在其他平台上进行测试,但它应该在任何地方都能工作。

示例:

代码语言:javascript
复制
{
    description: "Line one  \nLine two  \nLine three"
}

它将显示什么:

代码语言:javascript
复制
Line one
Line two
Line three

它将自动忽略\n前后的额外空格。

相关答案:https://stackoverflow.com/a/60083782/11421839

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73982041

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档