Created
October 7, 2017 16:32
-
-
Save be7DOTis/ad21fee20745af32d1369fa838be48d4 to your computer and use it in GitHub Desktop.
Example JSON for zoobeacon
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
{ | |
"animalName": "African Elephant", //This should be used as the page title and header | |
"animalNameLatin": "Loxodonta africana", //This should be the subtitle | |
"Type" :"Mammal", //Basic Facts | |
"Country's Found": ["zambia","kenya","congo"] //basic facts | |
"weight": 2000, //Basic Facts | |
"weightInAvgHuman": 25, //Basic Facts | |
"height": 3, //Basic Facts | |
"heightInAvgHuman": 2, //Basic Facts | |
"food": "grass" | |
"conservationInfo" { //Has its own section | |
"country": "foo", //From Red List | |
"growthForms": "foo", //From Red List | |
"Habitat": "foo", //From Red List | |
"Measure": "foo", //From Red List | |
"Region": "foo", //From Red List | |
"Species": "foo", //From Red List | |
"threat": "endangered" //This should be in a box at the top of conservationInfo, background changes color depending. //From Red List | |
"donationLinks" : "https://elephantaidinternational.org/projects/elephant-refuge-north-america" //this is probs sources manually | |
} | |
} |
var AnimalSchema = new Schema({
name : String,
latinName: String,
class: String,
countriesFound: [String],
weightInKg: Number,
weightInAvgHuman: Number,
heightInMeters: Number,
heightInAvgHuman: Number,
food: String,
habitat: String,
speed: String,
fact: String
conservationInfo: {
status: String,
changeInRange: String,
threats: String,
population: Number,
actions: String,
donationLinks: [String],
findOutMore: [String]
}
});
Code formatting. 🙃
var AnimalSchema = new Schema({
name : String,
latinName: String,
class: String,
countriesFound: [String],
weightInKg: Number,
weightInAvgHuman: Number,
heightInMeters: Number,
heightInAvgHuman: Number,
food: String,
habitat: String,
speed: String,
fact: String
conservationInfo: {
status: String,
changeInRange: String,
threats: String,
population: Number,
actions: String,
donationLinks: [String],
findOutMore: [String],
},
});
class: String,
countriesFound: [String],
weightInKg: Number,
weightInAvgHuman: Number,
heightInMeters: Number,
heightInAvgHuman: Number,
food: String,
habitat: String,
speed: String,
fact: String,
conservationInfo: {
status: String,
changeInRange: String,
threats: [String],
population: Number,
actions: [String],
donationLinks: [String],
findOutMore: [String]
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Updated: