protected void finish(CurrencyConversionJSON result)
 {
     if (fieldGeneratorInputValue.have_value)
     {
         result.initInputValue();
         int count = fieldGeneratorInputValue.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendInputValue(fieldGeneratorInputValue.value[num]);
         }
         fieldGeneratorInputValue.value.Clear();
         fieldGeneratorInputValue.have_value = false;
     }
     else if ((!(result.hasInputValue())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"InputValue\" field was missing.");
     }
     if (fieldGeneratorOutputValue.have_value)
     {
         result.initOutputValue();
         int count = fieldGeneratorOutputValue.value.Count;
         for (int num = 0; num < count; ++num)
         {
             result.appendOutputValue(fieldGeneratorOutputValue.value[num]);
         }
         fieldGeneratorOutputValue.value.Clear();
         fieldGeneratorOutputValue.have_value = false;
     }
     else if ((!(result.hasOutputValue())) && !allow_incomplete)
     {
         error("When parsing the object for %what%, the \"OutputValue\" field was missing.");
     }
 }
    private void  fromJSONConversions(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        JSONArrayValue json_array1 = json_value.array_value();

        if (json_array1 == null)
        {
            throw new Exception("The value for field Conversions of CurrencyConverterInformationNuggetJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <CurrencyConversionJSON> vector_Conversions1 = new List <CurrencyConversionJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            CurrencyConversionJSON convert_classy = CurrencyConversionJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Conversions1.Add(convert_classy);
        }
        initConversions();
        for (int num1 = 0; num1 < vector_Conversions1.Count; ++num1)
        {
            appendConversions(vector_Conversions1[num1]);
        }
        for (int num1 = 0; num1 < vector_Conversions1.Count; ++num1)
        {
        }
    }
        protected override void finish()
        {
            CurrencyConversionJSON result = new CurrencyConversionJSON();

            Debug.Assert(result != null);
            finish(result);
            handle_result(result);
        }
 public void appendConversions(CurrencyConversionJSON to_append)
 {
     if (!flagHasConversions)
     {
         flagHasConversions = true;
         storeConversions.Clear();
     }
     Debug.Assert(flagHasConversions);
     storeConversions.Add(to_append);
 }
 protected override void handle_result(CurrencyConversionJSON result)
 {
     top.value.Add(result);
 }
        protected override void handle_result(CurrencyConversionJSON result)
        {
//@@@            Debug.Assert(!have_value);
            have_value = true;
            value      = result;
        }
 protected abstract void handle_result(CurrencyConversionJSON new_result);