pub fn validate_json_compliance(json: &Value) -> boolExpand description
This function ensures the contents of a JSON file are compliant with the Off-Chain Shadow Standard which we define as a JSON with the non-null values for the following fields:
name: Name of the asset.symbol: Symbol of the asset.description: Description of the asset.image: URI pointing to the asset’s logo.external_url: URI pointing to an external URL defining the asset — e.g. the game’s main site.
The function simply checks whether these fields are non-null. Although we do not check for it, we recommend the following fields are included if relevant:
animation_url(optional): URI pointing to the asset’s animation.attributes(optional): Array of attributes defining the characteristics of the asset. a)trait_type: The type of attribute. b)value: The value for that attribute.