【发布时间】:2021-04-20 10:02:55
【问题描述】:
我想在 json 架构中包含一个 ipfs 内容标识符 (CID) 的模式。为此,我需要创建一个正则表达式来匹配它们。
{
"$schema": "http://json-schema.org/draft-07/schema#",
"$id": "http://json-schema.org/draft-07/schema#",
"title": "Example schema with an ipfs CID",
{ "type": "object",
"properties": {
"ipfs": { "type": "string","pattern": "<CID regex here>"}
}
}
为 IPFS CID 执行正则表达式的好方法是什么?
【问题讨论】:
标签: regex jsonschema ipfs