Created
August 8, 2018 13:00
-
-
Save DavidBiesack/0753c16156df8d426256d85cb36c5585 to your computer and use it in GitHub Desktop.
money JSON Schema
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"description": "An amount of money in a specific currency.", | |
"properties": { | |
"value": { | |
"description": "The net monetary value. A negative amount denotes a debit; a positive amount a credit. The numeric value is represented as a string so that it can be exact with no loss of precision.", | |
"example": "3456.78", | |
"type": "string" | |
}, | |
"currency": { | |
"description": "The [ISO 4217 currency code](https://en.wikipedia.org/wiki/ISO_4217) for this monetary value. This is always upper case ASCII. TODO: ISO 4217 defines three-character codes. However, ISO 4217 does not account for cryptocurrencies. Of note, DASH uses 4 characters.", | |
"type": "string", | |
"minLength": 3, | |
"maxLength": 3 | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment