Exemplo n.º 1
0
 public string ToJson()
 {
     return(JsonTemplate.FillTemplate(JSONTemplate, new Dictionary <string, string>()
     {
         { "@id", JsonLdId.ToString() },
         { "nodeGraph", SerializeNodeTreeRecursive(Node).Replace("'", "\"") },
     }));
 }
Exemplo n.º 2
0
 public string ToJson()
 {
     return(JsonTemplate.FillTemplate(JSONTemplate, new Dictionary <string, string>()
     {
         { "id", JsonLdId.ToString() },
         { "authorJSON", JsonUtility.ToJson(Author) },
         { "createdTimestamp", CreatedAt.ToString() },
         { "annotationText", Text },
         { "targetID", Target.JsonLdId.ToString() },
         { "targetNodeName", TargetNode.Name },
         { "simulatedDate", AnnotationManager.Instance.SimulatedYear },
         { "simulatedTimeofDay", AnnotationManager.Instance.SimulatedTimeOfDay },
         { "guidPath", TargetNode.GuidPath },
         { "annotationPosition", JsonUtility.ToJson(AnnotationPosition) },
         { "viewPortPosition", JsonUtility.ToJson(ViewPortPosition) },
     }));
 }