Пример #1
0
        public static MMTDeclaration FromJson(string json)
        {
            MMTDeclaration mmtDecl = JsonConvert.DeserializeObject <MMTDeclaration>(json);

            if (mmtDecl.label == null)
            {
                mmtDecl.label = string.Empty;
            }

            return(mmtDecl);
        }
Пример #2
0
        public static string ToJson(MMTDeclaration mmtDecl)
        {
            if (mmtDecl.label == null)
            {
                mmtDecl.label = string.Empty;
            }

            string json = JsonConvert.SerializeObject(mmtDecl);

            return(json);
        }
Пример #3
0
    public static bool sendAdd(MMTDeclaration mmtDecl, out string uri)
    {
        string body = MMTSymbolDeclaration.ToJson(mmtDecl);

        return(sendAdd(CommunicationEvents.ServerAdress + "/fact/add", body, out uri));
    }
Пример #4
0
        public static string ToJson(MMTDeclaration mmtDecl)
        {
            string json = JsonConvert.SerializeObject(mmtDecl);

            return(json);
        }
Пример #5
0
        public static MMTDeclaration FromJson(string json)
        {
            MMTDeclaration mmtDecl = JsonConvert.DeserializeObject <MMTDeclaration>(json);

            return(mmtDecl);
        }