Wednesday, November 15, 2017

json Examples

--Books and Book reviews-Reviewer Registered
Books, Authors, Reviewers, Reviews, publishers

Books
{
  _id : 1,
  title : "Grapes of Wrath",
  author : "John Steinbeck",
  pubYear : "1939",
  descript : "A story of one family's journey to  California during the dustbowl"
}
{
  _id : 2,
  title : "Best Scifi and Fantasy 2015",
  author : ["Neil Gaimen", "C. S. Lewis", "Ray Bradbury"],
  pubYear : "2015",
  descript : "A collection of classic scifi stories"
}

Author
{
   _id : 1,
   authorName : "Neil Gaimen",
   nationality : "English",
   book : [
            {
      title : "Neverwhere",
             descript: "A man becomes lost in the London underground"
      },
             {
               title : "American Gods",
               descript : "Ancient gods try to survive in modern America"
       }
            ]
}

  

Afternoon Example

movie
{
  _id : 1,
  title : "Step Brothers",
  year : 2008,
  actor : ["John C. Riley", "Will Ferrell"],
  director : "Adam McKay"
}

actor
{
   _id : 1,
   actor_name : "Will Ferrell",
   movies :[
            {title: "Step Brothers", year : 2008},
            {title: "Elf", year : 2003},
            {title: "Anchorman", year : 2004}
           ]

}

No comments:

Post a Comment