private void  fromJSONValue(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 Value of ContactListWithGroupingJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <OneContactWithGroupingJSON> vector_Value1 = new List <OneContactWithGroupingJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            OneContactWithGroupingJSON convert_classy = OneContactWithGroupingJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Value1.Add(convert_classy);
        }
        initValue();
        for (int num1 = 0; num1 < vector_Value1.Count; ++num1)
        {
            appendValue(vector_Value1[num1]);
        }
        for (int num1 = 0; num1 < vector_Value1.Count; ++num1)
        {
        }
    }
예제 #2
0
    private void  fromJSONInformationNuggets(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 InformationNuggets of InformationCommandJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 1)
        {
            throw new Exception("The value for field InformationNuggets of InformationCommandJSON has too few elements.");
        }
        List <InformationNuggetJSON> vector_InformationNuggets1 = new List <InformationNuggetJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            InformationNuggetJSON convert_classy = InformationNuggetJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_InformationNuggets1.Add(convert_classy);
        }
        Debug.Assert(vector_InformationNuggets1.Count >= 1);
        initInformationNuggets();
        for (int num1 = 0; num1 < vector_InformationNuggets1.Count; ++num1)
        {
            appendInformationNuggets(vector_InformationNuggets1[num1]);
        }
        for (int num1 = 0; num1 < vector_InformationNuggets1.Count; ++num1)
        {
        }
    }
    private void  fromJSONUserCoordinates(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 UserCoordinates of BattleshipQueryStateJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <BattleshipCoordinateJSON> vector_UserCoordinates1 = new List <BattleshipCoordinateJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            BattleshipCoordinateJSON convert_classy = BattleshipCoordinateJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_UserCoordinates1.Add(convert_classy);
        }
        initUserCoordinates();
        for (int num1 = 0; num1 < vector_UserCoordinates1.Count; ++num1)
        {
            appendUserCoordinates(vector_UserCoordinates1[num1]);
        }
        for (int num1 = 0; num1 < vector_UserCoordinates1.Count; ++num1)
        {
        }
    }
예제 #4
0
    private void  fromJSONArguments(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 Arguments of GeonameAttributeWithArgumentsJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <GeonameAttributeArgumentJSON> vector_Arguments1 = new List <GeonameAttributeArgumentJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            GeonameAttributeArgumentJSON convert_classy = GeonameAttributeArgumentJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Arguments1.Add(convert_classy);
        }
        initArguments();
        for (int num1 = 0; num1 < vector_Arguments1.Count; ++num1)
        {
            appendArguments(vector_Arguments1[num1]);
        }
        for (int num1 = 0; num1 < vector_Arguments1.Count; ++num1)
        {
        }
    }
예제 #5
0
    private void  fromJSONIngredients(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 Ingredients of DrinkRecipeJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <DrinkIngredientJSON> vector_Ingredients1 = new List <DrinkIngredientJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            DrinkIngredientJSON convert_classy = DrinkIngredientJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Ingredients1.Add(convert_classy);
        }
        initIngredients();
        for (int num2 = 0; num2 < vector_Ingredients1.Count; ++num2)
        {
            appendIngredients(vector_Ingredients1[num2]);
        }
        for (int num1 = 0; num1 < vector_Ingredients1.Count; ++num1)
        {
        }
    }
예제 #6
0
    private void  fromJSONLogos(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 Logos of SportsTeamNewJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <SportsTeamLogoJSON> vector_Logos1 = new List <SportsTeamLogoJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            SportsTeamLogoJSON convert_classy = SportsTeamLogoJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Logos1.Add(convert_classy);
        }
        initLogos();
        for (int num1 = 0; num1 < vector_Logos1.Count; ++num1)
        {
            appendLogos(vector_Logos1[num1]);
        }
        for (int num1 = 0; num1 < vector_Logos1.Count; ++num1)
        {
        }
    }
예제 #7
0
    private void  fromJSONResults(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 Results of GeonameFactsInformationNuggetJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <GeonameObjectJSON> vector_Results1 = new List <GeonameObjectJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            GeonameObjectJSON convert_classy = GeonameObjectJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Results1.Add(convert_classy);
        }
        initResults();
        for (int num2 = 0; num2 < vector_Results1.Count; ++num2)
        {
            appendResults(vector_Results1[num2]);
        }
        for (int num1 = 0; num1 < vector_Results1.Count; ++num1)
        {
        }
    }
예제 #8
0
    private void  fromJSONFlightStatuses(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 FlightStatuses of FlightStatusSearchResultJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <FlightStatusJSON> vector_FlightStatuses1 = new List <FlightStatusJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            FlightStatusJSON convert_classy = FlightStatusJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_FlightStatuses1.Add(convert_classy);
        }
        initFlightStatuses();
        for (int num1 = 0; num1 < vector_FlightStatuses1.Count; ++num1)
        {
            appendFlightStatuses(vector_FlightStatuses1[num1]);
        }
        for (int num1 = 0; num1 < vector_FlightStatuses1.Count; ++num1)
        {
        }
    }
예제 #9
0
    private void  fromJSONDictionaryEntries(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 DictionaryEntries of DictionarySearchInformationNuggetJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <DictionaryEntryJSON> vector_DictionaryEntries1 = new List <DictionaryEntryJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            DictionaryEntryJSON convert_classy = DictionaryEntryJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_DictionaryEntries1.Add(convert_classy);
        }
        initDictionaryEntries();
        for (int num2 = 0; num2 < vector_DictionaryEntries1.Count; ++num2)
        {
            appendDictionaryEntries(vector_DictionaryEntries1[num2]);
        }
        for (int num1 = 0; num1 < vector_DictionaryEntries1.Count; ++num1)
        {
        }
    }
    private void  fromJSONValue(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 Value of BlackjackHandJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 1)
        {
            throw new Exception("The value for field Value of BlackjackHandJSON has too few elements.");
        }
        List <PlayingCardJSON> vector_Value1 = new List <PlayingCardJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            PlayingCardJSON convert_classy = PlayingCardJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Value1.Add(convert_classy);
        }
        Debug.Assert(vector_Value1.Count >= 1);
        initValue();
        for (int num1 = 0; num1 < vector_Value1.Count; ++num1)
        {
            appendValue(vector_Value1[num1]);
        }
        for (int num1 = 0; num1 < vector_Value1.Count; ++num1)
        {
        }
    }
예제 #11
0
    private void  fromJSONEventInstances(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 EventInstances of SportsOlympicsEventSchedulesAndResultsInformationNuggetJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <SportsOlympicsEventSchedulesAndResultsInstanceJSON> vector_EventInstances1 = new List <SportsOlympicsEventSchedulesAndResultsInstanceJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            SportsOlympicsEventSchedulesAndResultsInstanceJSON convert_classy = SportsOlympicsEventSchedulesAndResultsInstanceJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_EventInstances1.Add(convert_classy);
        }
        initEventInstances();
        for (int num3 = 0; num3 < vector_EventInstances1.Count; ++num3)
        {
            appendEventInstances(vector_EventInstances1[num3]);
        }
        for (int num1 = 0; num1 < vector_EventInstances1.Count; ++num1)
        {
        }
    }
예제 #12
0
    private void  fromJSONQueryResults(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 QueryResults of SportsOlympicsEventSchedulesAndResultsInformationNuggetJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 1)
        {
            throw new Exception("The value for field QueryResults of SportsOlympicsEventSchedulesAndResultsInformationNuggetJSON has too few elements.");
        }
        List <SportsOlympicsEventSchedulesAndResultsQueryResultJSON> vector_QueryResults1 = new List <SportsOlympicsEventSchedulesAndResultsQueryResultJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            SportsOlympicsEventSchedulesAndResultsQueryResultJSON convert_classy = SportsOlympicsEventSchedulesAndResultsQueryResultJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_QueryResults1.Add(convert_classy);
        }
        Debug.Assert(vector_QueryResults1.Count >= 1);
        initQueryResults();
        for (int num2 = 0; num2 < vector_QueryResults1.Count; ++num2)
        {
            appendQueryResults(vector_QueryResults1[num2]);
        }
        for (int num1 = 0; num1 < vector_QueryResults1.Count; ++num1)
        {
        }
    }
예제 #13
0
    private void  fromJSONprices(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 prices of UberPriceEstimatesResponseJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <UberPriceEstimateDetailsJSON> vector_prices1 = new List <UberPriceEstimateDetailsJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            UberPriceEstimateDetailsJSON convert_classy = UberPriceEstimateDetailsJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_prices1.Add(convert_classy);
        }
        initprices();
        for (int num1 = 0; num1 < vector_prices1.Count; ++num1)
        {
            appendprices(vector_prices1[num1]);
        }
        for (int num1 = 0; num1 < vector_prices1.Count; ++num1)
        {
        }
    }
예제 #14
0
    private void  fromJSONExcludes(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 Excludes of FlightSeatPreferencesJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 1)
        {
            throw new Exception("The value for field Excludes of FlightSeatPreferencesJSON has too few elements.");
        }
        List <FlightSeatTypeJSON> vector_Excludes1 = new List <FlightSeatTypeJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            FlightSeatTypeJSON convert_classy = FlightSeatTypeJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Excludes1.Add(convert_classy);
        }
        Debug.Assert(vector_Excludes1.Count >= 1);
        initExcludes();
        for (int num2 = 0; num2 < vector_Excludes1.Count; ++num2)
        {
            appendExcludes(vector_Excludes1[num2]);
        }
        for (int num1 = 0; num1 < vector_Excludes1.Count; ++num1)
        {
        }
    }
예제 #15
0
    private void  fromJSONQueryBlocks(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 QueryBlocks of StockMarketNativeDataJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <StockQueryBlockJSON> vector_QueryBlocks1 = new List <StockQueryBlockJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            StockQueryBlockJSON convert_classy = StockQueryBlockJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_QueryBlocks1.Add(convert_classy);
        }
        initQueryBlocks();
        for (int num1 = 0; num1 < vector_QueryBlocks1.Count; ++num1)
        {
            appendQueryBlocks(vector_QueryBlocks1[num1]);
        }
        for (int num1 = 0; num1 < vector_QueryBlocks1.Count; ++num1)
        {
        }
    }
    private void  fromJSONPartOfSpeech(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 PartOfSpeech of DictionaryDefinitionJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <DictionaryPartOfSpeechJSON> vector_PartOfSpeech1 = new List <DictionaryPartOfSpeechJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            DictionaryPartOfSpeechJSON convert_classy = DictionaryPartOfSpeechJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_PartOfSpeech1.Add(convert_classy);
        }
        initPartOfSpeech();
        for (int num1 = 0; num1 < vector_PartOfSpeech1.Count; ++num1)
        {
            appendPartOfSpeech(vector_PartOfSpeech1[num1]);
        }
        for (int num1 = 0; num1 < vector_PartOfSpeech1.Count; ++num1)
        {
        }
    }
    private void  fromJSONExamples(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 Examples of DictionaryDefinitionJSON is not an array.");
        }
        int           count1           = json_array1.componentCount();
        List <string> vector_Examples1 = new List <string>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            JSONStringValue json_string = json_array1.component(num1).string_value();
            if (json_string == null)
            {
                throw new Exception("The value for an element of field Examples of DictionaryDefinitionJSON is not a string.");
            }
            vector_Examples1.Add(json_string.getData());
        }
        initExamples();
        for (int num2 = 0; num2 < vector_Examples1.Count; ++num2)
        {
            appendExamples(vector_Examples1[num2]);
        }
        for (int num1 = 0; num1 < vector_Examples1.Count; ++num1)
        {
        }
    }
예제 #18
0
    private void  fromJSONStatisticsTypeAndValue(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 StatisticsTypeAndValue of SportsStatsQueryDataJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <SportsStatsTypeAndValueJSON> vector_StatisticsTypeAndValue1 = new List <SportsStatsTypeAndValueJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            SportsStatsTypeAndValueJSON convert_classy = SportsStatsTypeAndValueJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_StatisticsTypeAndValue1.Add(convert_classy);
        }
        initStatisticsTypeAndValue();
        for (int num1 = 0; num1 < vector_StatisticsTypeAndValue1.Count; ++num1)
        {
            appendStatisticsTypeAndValue(vector_StatisticsTypeAndValue1[num1]);
        }
        for (int num1 = 0; num1 < vector_StatisticsTypeAndValue1.Count; ++num1)
        {
        }
    }
예제 #19
0
    private void  fromJSONTeams(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 Teams of SportsTeamsResponseStateJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 1)
        {
            throw new Exception("The value for field Teams of SportsTeamsResponseStateJSON has too few elements.");
        }
        List <SportsTeamNewJSON> vector_Teams1 = new List <SportsTeamNewJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            SportsTeamNewJSON convert_classy = SportsTeamNewJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_Teams1.Add(convert_classy);
        }
        Debug.Assert(vector_Teams1.Count >= 1);
        initTeams();
        for (int num1 = 0; num1 < vector_Teams1.Count; ++num1)
        {
            appendTeams(vector_Teams1[num1]);
        }
        for (int num1 = 0; num1 < vector_Teams1.Count; ++num1)
        {
        }
    }
예제 #20
0
    private void  fromJSONAmbiguousMatches(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 AmbiguousMatches of SMSRecipientsJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <WhichContactChoicesJSON> vector_AmbiguousMatches1 = new List <WhichContactChoicesJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            WhichContactChoicesJSON convert_classy = WhichContactChoicesJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_AmbiguousMatches1.Add(convert_classy);
        }
        initAmbiguousMatches();
        for (int num2 = 0; num2 < vector_AmbiguousMatches1.Count; ++num2)
        {
            appendAmbiguousMatches(vector_AmbiguousMatches1[num2]);
        }
        for (int num1 = 0; num1 < vector_AmbiguousMatches1.Count; ++num1)
        {
        }
    }
예제 #21
0
    private void  fromJSONPersonsWithAmbiguousPhoneNumbers(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 PersonsWithAmbiguousPhoneNumbers of SMSRecipientsJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <ContactNumberChoicesJSON> vector_PersonsWithAmbiguousPhoneNumbers1 = new List <ContactNumberChoicesJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            ContactNumberChoicesJSON convert_classy = ContactNumberChoicesJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_PersonsWithAmbiguousPhoneNumbers1.Add(convert_classy);
        }
        initPersonsWithAmbiguousPhoneNumbers();
        for (int num3 = 0; num3 < vector_PersonsWithAmbiguousPhoneNumbers1.Count; ++num3)
        {
            appendPersonsWithAmbiguousPhoneNumbers(vector_PersonsWithAmbiguousPhoneNumbers1[num3]);
        }
        for (int num1 = 0; num1 < vector_PersonsWithAmbiguousPhoneNumbers1.Count; ++num1)
        {
        }
    }
예제 #22
0
    private void  fromJSONUnambiguousRecipients(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 UnambiguousRecipients of SMSRecipientsJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <UnambiguousSMSRecipientJSON> vector_UnambiguousRecipients1 = new List <UnambiguousSMSRecipientJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            UnambiguousSMSRecipientJSON convert_classy = UnambiguousSMSRecipientJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_UnambiguousRecipients1.Add(convert_classy);
        }
        initUnambiguousRecipients();
        for (int num1 = 0; num1 < vector_UnambiguousRecipients1.Count; ++num1)
        {
            appendUnambiguousRecipients(vector_UnambiguousRecipients1[num1]);
        }
        for (int num1 = 0; num1 < vector_UnambiguousRecipients1.Count; ++num1)
        {
        }
    }
예제 #23
0
    private void  fromJSONNoNumberMatches(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 NoNumberMatches of SMSRecipientsJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <PersonGroupJSON> vector_NoNumberMatches1 = new List <PersonGroupJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            PersonGroupJSON convert_classy = PersonGroupJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_NoNumberMatches1.Add(convert_classy);
        }
        initNoNumberMatches();
        for (int num4 = 0; num4 < vector_NoNumberMatches1.Count; ++num4)
        {
            appendNoNumberMatches(vector_NoNumberMatches1[num4]);
        }
        for (int num1 = 0; num1 < vector_NoNumberMatches1.Count; ++num1)
        {
        }
    }
예제 #24
0
    private void  fromJSONCityName(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 CityName of AreaCodeCityOfCodeInfoNuggetJSON is not an array.");
        }
        int           count1           = json_array1.componentCount();
        List <string> vector_CityName1 = new List <string>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            JSONStringValue json_string = json_array1.component(num1).string_value();
            if (json_string == null)
            {
                throw new Exception("The value for an element of field CityName of AreaCodeCityOfCodeInfoNuggetJSON is not a string.");
            }
            vector_CityName1.Add(json_string.getData());
        }
        initCityName();
        for (int num1 = 0; num1 < vector_CityName1.Count; ++num1)
        {
            appendCityName(vector_CityName1[num1]);
        }
        for (int num1 = 0; num1 < vector_CityName1.Count; ++num1)
        {
        }
    }
예제 #25
0
    private void  fromJSONDeviceItems(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 DeviceItems of HomeAutomationCompactDeviceSpecifierJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 1)
        {
            throw new Exception("The value for field DeviceItems of HomeAutomationCompactDeviceSpecifierJSON has too few elements.");
        }
        List <HomeAutomationDeviceParsingItemJSON> vector_DeviceItems1 = new List <HomeAutomationDeviceParsingItemJSON>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            HomeAutomationDeviceParsingItemJSON convert_classy = HomeAutomationDeviceParsingItemJSON.from_json(json_array1.component(num1), ignore_extras, true);
            vector_DeviceItems1.Add(convert_classy);
        }
        Debug.Assert(vector_DeviceItems1.Count >= 1);
        initDeviceItems();
        for (int num2 = 0; num2 < vector_DeviceItems1.Count; ++num2)
        {
            appendDeviceItems(vector_DeviceItems1[num2]);
        }
        for (int num1 = 0; num1 < vector_DeviceItems1.Count; ++num1)
        {
        }
    }
예제 #26
0
    private void  fromJSONValues(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 Values of RandomNumberGeneratorDiceRollRequestResultJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 1)
        {
            throw new Exception("The value for field Values of RandomNumberGeneratorDiceRollRequestResultJSON has too few elements.");
        }
        List <BigInteger> vector_Values1 = new List <BigInteger>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            BigInteger       extracted_integer;
            JSONIntegerValue json_integer = json_array1.component(num1).integer_value();
            if (json_integer == null)
            {
                JSONRationalValue json_rational = json_array1.component(num1).rational_value();
                if (json_rational == null)
                {
                    throw new Exception("The value for an element of field Values of RandomNumberGeneratorDiceRollRequestResultJSON is not a number.");
                }
                if (!(json_rational.isInteger()))
                {
                    throw new Exception("The value for an element of field Values of RandomNumberGeneratorDiceRollRequestResultJSON is not an integer.");
                }
                extracted_integer = json_rational.getInteger();
            }
            else
            {
                extracted_integer = json_integer.getData();
            }
            vector_Values1.Add(extracted_integer);
        }
        Debug.Assert(vector_Values1.Count >= 1);
        initValues();
        for (int num1 = 0; num1 < vector_Values1.Count; ++num1)
        {
            appendValues(vector_Values1[num1]);
        }
        for (int num1 = 0; num1 < vector_Values1.Count; ++num1)
        {
        }
    }
예제 #27
0
    private void  fromJSONAwayGoals(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 AwayGoals of SportsSeriesStatusJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 2)
        {
            throw new Exception("The value for field AwayGoals of SportsSeriesStatusJSON has too few elements.");
        }
        List <BigInteger> vector_AwayGoals1 = new List <BigInteger>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            BigInteger       extracted_integer;
            JSONIntegerValue json_integer = json_array1.component(num1).integer_value();
            if (json_integer == null)
            {
                JSONRationalValue json_rational = json_array1.component(num1).rational_value();
                if (json_rational == null)
                {
                    throw new Exception("The value for an element of field AwayGoals of SportsSeriesStatusJSON is not a number.");
                }
                if (!(json_rational.isInteger()))
                {
                    throw new Exception("The value for an element of field AwayGoals of SportsSeriesStatusJSON is not an integer.");
                }
                extracted_integer = json_rational.getInteger();
            }
            else
            {
                extracted_integer = json_integer.getData();
            }
            vector_AwayGoals1.Add(extracted_integer);
        }
        Debug.Assert(vector_AwayGoals1.Count >= 2);
        initAwayGoals();
        for (int num2 = 0; num2 < vector_AwayGoals1.Count; ++num2)
        {
            appendAwayGoals(vector_AwayGoals1[num2]);
        }
        for (int num1 = 0; num1 < vector_AwayGoals1.Count; ++num1)
        {
        }
    }
예제 #28
0
    private void  fromJSONArgumentSets(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 ArgumentSets of SportsOlympicsMedalStandingsQueryStateJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 1)
        {
            throw new Exception("The value for field ArgumentSets of SportsOlympicsMedalStandingsQueryStateJSON has too few elements.");
        }
        List <List <SportsOlympicsMedalStandingsArgumentJSON> > vector_ArgumentSets1 = new List <List <SportsOlympicsMedalStandingsArgumentJSON> >(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            JSONArrayValue json_array2 = json_array1.component(num1).array_value();
            if (json_array2 == null)
            {
                throw new Exception("The value for an element of field ArgumentSets of SportsOlympicsMedalStandingsQueryStateJSON is not an array.");
            }
            int count2 = json_array2.componentCount();
            if (count2 < 1)
            {
                throw new Exception("The value for an element of field ArgumentSets of SportsOlympicsMedalStandingsQueryStateJSON has too few elements.");
            }
            List <SportsOlympicsMedalStandingsArgumentJSON> vector_ArgumentSets2 = new List <SportsOlympicsMedalStandingsArgumentJSON>(count2);
            for (int num2 = 0; num2 < count2; ++num2)
            {
                SportsOlympicsMedalStandingsArgumentJSON convert_classy = SportsOlympicsMedalStandingsArgumentJSON.from_json(json_array2.component(num2), ignore_extras, true);
                vector_ArgumentSets2.Add(convert_classy);
            }
            vector_ArgumentSets1.Add(vector_ArgumentSets2);
        }
        Debug.Assert(vector_ArgumentSets1.Count >= 1);
        initArgumentSets();
        for (int num1 = 0; num1 < vector_ArgumentSets1.Count; ++num1)
        {
            appendArgumentSets(vector_ArgumentSets1[num1]);
        }
        for (int num1 = 0; num1 < vector_ArgumentSets1.Count; ++num1)
        {
            for (int num2 = 0; num2 < vector_ArgumentSets1[num1].Count; ++num2)
            {
            }
        }
    }
예제 #29
0
    private void  fromJSONValues(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 Values of RandomNumberGeneratorNumberRequestResultJSON is not an array.");
        }
        int count1 = json_array1.componentCount();

        if (count1 < 1)
        {
            throw new Exception("The value for field Values of RandomNumberGeneratorNumberRequestResultJSON has too few elements.");
        }
        List <Double> vector_Values1 = new List <Double>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            JSONRationalValue json_rational = json_array1.component(num1).rational_value();
            double            the_double;
            if (json_rational != null)
            {
                the_double = json_rational.getDouble();
            }
            else
            {
                JSONIntegerValue json_integer = json_array1.component(num1).integer_value();
                if (json_integer != null)
                {
                    the_double = json_integer.getLongInt();
                }
                else
                {
                    throw new Exception("The value for an element of field Values of RandomNumberGeneratorNumberRequestResultJSON is not a number.");
                }
            }
            vector_Values1.Add(the_double);
        }
        Debug.Assert(vector_Values1.Count >= 1);
        initValues();
        for (int num1 = 0; num1 < vector_Values1.Count; ++num1)
        {
            appendValues(vector_Values1[num1]);
        }
        for (int num1 = 0; num1 < vector_Values1.Count; ++num1)
        {
        }
    }
예제 #30
0
    private void  fromJSONParticipantsIndices(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 ParticipantsIndices of SportsOlympicsEventSchedulesAndResultsEventInstanceMappingJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <BigInteger> vector_ParticipantsIndices1 = new List <BigInteger>(count1);

        for (int num1 = 0; num1 < count1; ++num1)
        {
            BigInteger       extracted_integer;
            JSONIntegerValue json_integer = json_array1.component(num1).integer_value();
            if (json_integer == null)
            {
                JSONRationalValue json_rational = json_array1.component(num1).rational_value();
                if (json_rational == null)
                {
                    throw new Exception("The value for an element of field ParticipantsIndices of SportsOlympicsEventSchedulesAndResultsEventInstanceMappingJSON is not a number.");
                }
                if (!(json_rational.isInteger()))
                {
                    throw new Exception("The value for an element of field ParticipantsIndices of SportsOlympicsEventSchedulesAndResultsEventInstanceMappingJSON is not an integer.");
                }
                extracted_integer = json_rational.getInteger();
            }
            else
            {
                extracted_integer = json_integer.getData();
            }
            vector_ParticipantsIndices1.Add(extracted_integer);
        }
        initParticipantsIndices();
        for (int num2 = 0; num2 < vector_ParticipantsIndices1.Count; ++num2)
        {
            appendParticipantsIndices(vector_ParticipantsIndices1[num2]);
        }
        for (int num1 = 0; num1 < vector_ParticipantsIndices1.Count; ++num1)
        {
        }
    }