Skip to content
Snippets Groups Projects
Select Git revision
  • 8ea5f34f3d4a77d8ca17477b82dd23446710a06a
  • master default
  • dependabot/nuget/source/Sample/Newtonsoft.Json-13.0.1
  • dependabot/nuget/source/MasterDevs.ChromeDevTools.Tests/Newtonsoft.Json-13.0.1
  • dependabot/nuget/source/ProtocolGenerator/Newtonsoft.Json-13.0.1
  • dependabot/nuget/source/ChromeDevTools/Newtonsoft.Json-13.0.1
  • dependabot/nuget/source/ChromeDevTools/System.Net.Http-4.3.4
  • revert-29-revert-24-protocol_62
  • revert-24-protocol_62
  • 1.1.0
  • 1.0.2
  • 1.0.1
  • 1.0.0.40915
13 results

DispatchMessageFromWorkerEvent.cs

Blame
    • Frederik Carlier's avatar
      f795049b
      Better support for optional values: · f795049b
      Frederik Carlier authored
      - Set NullValueHandling to NullValueHandling.Ignore, so that null values are not serialized
      - If .NET primitive types (like bool or long) are optional, use nulltable types, so that they can be ignored when serializing
      f795049b
      History
      Better support for optional values:
      Frederik Carlier authored
      - Set NullValueHandling to NullValueHandling.Ignore, so that null values are not serialized
      - If .NET primitive types (like bool or long) are optional, use nulltable types, so that they can be ignored when serializing
    Scroll.cs 702 B
    using System.Collections;
    using System.Collections.Generic;
    using System;
    using UnityEngine;
    
    [Serializable]
    public class Declaration
    {
        public string name;
        public string isProof;
        public string value;
        public string identifier;
        public string description;
    }
    
    
    [Serializable]
    public class Scroll
    {
        public string problemTheory;
        public string solutionTheory;
        public string label;
        public string description;
        public Declaration[] declarations;
        //public string output;
    
        public static Scroll generateFromJson(string json) {
           return JsonUtility.FromJson<Scroll>(json);
        }
    
        public string toJson() {
            return JsonUtility.ToJson(this);
        } 
    }