43 lines
1.5 KiB
Markdown
43 lines
1.5 KiB
Markdown
# FlavorStash Json Schema
|
|
|
|
This schema was created to make it easy to share or transfer your flavor stash
|
|
between different websites or applications. This could be used on a website by
|
|
presenting the json data and allowing the user to copy it and paste it on
|
|
another site.
|
|
|
|
## Use cases
|
|
* Any application or site where a list of flavorings is maintained.
|
|
|
|
## Implementation Suggestions
|
|
* For websites, make the json available to copy (to export) or paste and submit (to import).
|
|
* For applications, allowing both to save/load from file and clipboard is suggested.
|
|
|
|
## Implementation Details
|
|
The schema is as simplified as possible, meaning only the `flavor` field is required for
|
|
each record. It is recommended that the vendor is included, and that the vendor is not
|
|
merged into the flavor.
|
|
|
|
[
|
|
{ "vendor":"TFA", "flavor":"Smooth" }
|
|
]
|
|
|
|
Additional application-specific data can be included:
|
|
|
|
[
|
|
{ "vendor":"TFA", "flavor":"Smooth", "extra":{ "is_additive":true }}
|
|
]
|
|
|
|
### Standard Extra keys
|
|
The following keys are standardized and should not be used for any other purpose than specified.
|
|
|
|
Application-specific data can (and should) be namespaced using dots, eg. `my_mixer_app.favorite`.
|
|
|
|
| Key | Type | Description |
|
|
| ------------- | -------- | ----------------------------------------- |
|
|
| `g_ml` | decimal | The specific gravity in grams per 1ml |
|
|
| `is_additive` | bool | If `true` the flavor is an additive |
|
|
|
|
|
|
|
|
|