Skip to content

create data nested in a main data with new id

   "@context":"http://owl.openinitiative.com/oicontext.jsonld",
   "@graph":[  
      {  
         "@id":"_:b1",
         "http://happy-dev.fr/owl/#author_user_id":"1",
         "http://happy-dev.fr/owl/#text":"message 4"
      },
      {  
         "@id":"http://localhost:8000/messages/1/",
         "http://happy-dev.fr/owl/#author_user_id":"1",
         "http://happy-dev.fr/owl/#text":"message 1"
      },
      {  
         "@id":"http://localhost:8000/messages/2/",
         "http://happy-dev.fr/owl/#author_user_id":"1",
         "http://happy-dev.fr/owl/#text":"message 3"
      },
      {  
         "@id":"http://localhost:8000/threads/1/",
         "http://happy-dev.fr/owl/#author_user_id":"1",
         "http://happy-dev.fr/owl/#message_set":{  
            "@id":"http://localhost:8000/threads/1/message_set/"
         },
         "http://happy-dev.fr/owl/#text":"fil 1",
         "http://happy-dev.fr/owl/#title":"thread 1"
      },
      {  
         "@id":"http://localhost:8000/threads/1/message_set/",
         "http://www.w3.org/ns/ldp#contains":[  
            {  
               "@id":"http://localhost:8000/messages/1/"
            },
            {  
               "@id":"http://localhost:8000/messages/2/"
            },
            {  
               "@id":"_:b1"
            }
         ]
      }
   ]
}
Edited by Ghost User