public static MMTDeclaration FromJson(string json) { MMTDeclaration mmtDecl = JsonConvert.DeserializeObject <MMTDeclaration>(json); if (mmtDecl.label == null) { mmtDecl.label = string.Empty; } return(mmtDecl); }
public static string ToJson(MMTDeclaration mmtDecl) { if (mmtDecl.label == null) { mmtDecl.label = string.Empty; } string json = JsonConvert.SerializeObject(mmtDecl); return(json); }
public static bool sendAdd(MMTDeclaration mmtDecl, out string uri) { string body = MMTSymbolDeclaration.ToJson(mmtDecl); return(sendAdd(CommunicationEvents.ServerAdress + "/fact/add", body, out uri)); }
public static string ToJson(MMTDeclaration mmtDecl) { string json = JsonConvert.SerializeObject(mmtDecl); return(json); }
public static MMTDeclaration FromJson(string json) { MMTDeclaration mmtDecl = JsonConvert.DeserializeObject <MMTDeclaration>(json); return(mmtDecl); }