Skip to content
Snippets Groups Projects
Select Git revision
  • 03e7c0aab7d0c400370e79b906622ae45d3bcc08
  • master default
  • JS-based-scroll-rendering
  • Paul_Marius_Level
  • Paul_Marius_2
  • Paul_Marius
  • Andi_Mark
  • be-UnityWebView
  • gitignoreFrameitServer
  • ZimmerBSc
  • Bugfix_StageLoading
  • stages
  • MAZIFAU_Experimental
  • tsc/coneworld
  • tsc/fact-interaction
  • marcel
  • MaZiFAU_TopSort
  • mergeHelper
  • zwischenSpeichern
  • tempAndrToMaster
  • SebBranch
  • 3.0
  • v2.1
  • v2.0
  • v1.0
25 results

HideUI_mobile.cs

Blame
  • JSONManager.cs 1.64 KiB
    using JsonSubTypes;
    using Newtonsoft.Json;
    using System.Collections;
    using System.Collections.Generic;
    using UnityEngine;
    
    public static class JSONManager 
    {
    
        public static string URIPrefix = "http://mathhub.info/MitM/core/geometry?3DGeometry?";
    
        [JsonConverter(typeof(JsonSubtypes), "kind")]
        public class MMTTerm
        {
            string kind;
        }
    
        public class OMA : MMTTerm
        {
            public MMTTerm applicant;
            public List<MMTTerm> arguments;
            public string kind = "OMA";
            public OMA(MMTTerm applicant, List<MMTTerm> arguments)
            {
                this.applicant = applicant;
                this.arguments = arguments;
            }
        }
    
        public class OMS : MMTTerm
        {
            public string uri;
            public string kind = "OMS";
    
            public OMS(string uri)
            {
                this.uri = URIPrefix + uri;
            }
        }
    
    
        public class OMF : MMTTerm
        {
            [JsonProperty("float")]
            public float f;
            public string kind = "OMF";
    
            public OMF(float f)
            {
                this.f = f;
            }
        }
    
    
        class DeclarationBody : MMTTerm
        {
            MMTTerm original;
            MMTTerm simplified;
            string kind = "O/S";
        }
    
    
        public class MMTDeclaration
        {
            public string label;
            public MMTTerm tp;
            public MMTTerm df;
        }
    
        public static MMTDeclaration FromJson(string json)
        {
            MMTDeclaration mmtDecl = JsonConvert.DeserializeObject<MMTDeclaration>(json);
            return mmtDecl;
        }
        public static string ToJson(MMTDeclaration mmtDecl)
        {
            string json = JsonConvert.SerializeObject(mmtDecl);
            return json;
        }
    
    }