What Is Type (like "object") In ERC721 Metadata JSON Schema
According to the standard, there's a type
such as "object" shown below. What is this type
for and what other types can we use? Can I use like "art?"
{
"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."
}
}
}
Answer
It's the datatype of the described item according to the JSON Schema specification. It's a standard used in other development fields as well - not limited just to NFTs or blockchain development.
There is a list of default allowed type
values: http://json-schema.org/understanding-json-schema/reference/type.html
It's possible to create a custom type in JSON Schema, but the limited scope of what the "ERC-721 Metadata Document" document allows, doesn't effectively allow for custom types.
TLDR: Cannot use type: "art"
in an "ERC-721 Metadata Document". Can use it in a larger scope (e.g. a REST endpoint definition).
Related Questions
- → I can't convert Json to string [OctoberCms]
- → Uncaught TypeError Illegal invocation when send FormData to ajax
- → Laravel Send URL with JSON
- → how to write react component to construct HTML DOM
- → AJAX folder path issue
- → Chaining "Count of Columns" of a Method to Single Query Builder
- → Laravel - bindings file for repositories
- → Good solution to work with rest-api like SPA with redux?
- → getting the correct record in Angular with a json feed and passed data
- → Transformer usage on laravel/dingo API
- → Google options Page not saving - Javascript
- → Ember.js JSON API confusion
- → How can I query Firebase for an equalTo boolean parameter?