예제 #1
0
 public override void write_fields_as_json(JSONHandler handler, bool partial_allowed)
 {
     base.write_fields_as_json(handler, partial_allowed);
     handler.pair("GeneralizedThingNuggetKind", getGeneralizedThingNuggetKind());
     Debug.Assert(partial_allowed || flagHasWhatInformation);
     if (flagHasWhatInformation)
     {
         handler.start_pair("WhatInformation");
         if (partial_allowed)
         {
             storeWhatInformation.write_partial_as_json(handler);
         }
         else
         {
             storeWhatInformation.write_as_json(handler);
         }
     }
     Debug.Assert(partial_allowed || flagHasGeneralizedThing);
     if (flagHasGeneralizedThing)
     {
         handler.start_pair("GeneralizedThing");
         if (partial_allowed)
         {
             storeGeneralizedThing.write_partial_as_json(handler);
         }
         else
         {
             storeGeneralizedThing.write_as_json(handler);
         }
     }
     Debug.Assert(partial_allowed || flagHasDerivation);
     if (flagHasDerivation)
     {
         handler.start_pair("Derivation");
         if (partial_allowed)
         {
             storeDerivation.write_partial_as_json(handler);
         }
         else
         {
             storeDerivation.write_as_json(handler);
         }
     }
 }
예제 #2
0
 public override void write_fields_as_json(JSONHandler handler, bool partial_allowed)
 {
     base.write_fields_as_json(handler, partial_allowed);
     handler.pair("PropertyValueKind", getPropertyValueKind());
     Debug.Assert(partial_allowed || flagHasBase);
     if (flagHasBase)
     {
         handler.start_pair("Base");
         if (partial_allowed)
         {
             storeBase.write_partial_as_json(handler);
         }
         else
         {
             storeBase.write_as_json(handler);
         }
     }
     Debug.Assert(partial_allowed || flagHasProperty);
     if (flagHasProperty)
     {
         handler.start_pair("Property");
         if (partial_allowed)
         {
             storeProperty.write_partial_as_json(handler);
         }
         else
         {
             storeProperty.write_as_json(handler);
         }
     }
     Debug.Assert(partial_allowed || flagHasValueSpokenLabel);
     if (flagHasValueSpokenLabel)
     {
         handler.start_pair("ValueSpokenLabel");
         handler.string_value(storeValueSpokenLabel);
     }
     Debug.Assert(partial_allowed || flagHasValueWrittenLabel);
     if (flagHasValueWrittenLabel)
     {
         handler.start_pair("ValueWrittenLabel");
         handler.string_value(storeValueWrittenLabel);
     }
 }