コード例 #1
0
    private void  fromJSONModifier(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field Modifier of RandomNumberGeneratorDiceRollRequestResultJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field Modifier of RandomNumberGeneratorDiceRollRequestResultJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setModifier(extracted_integer);
    }
コード例 #2
0
    private void  fromJSONAbridgedMaximumRank(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field AbridgedMaximumRank of SportsOlympicsMedalStandingsJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field AbridgedMaximumRank of SportsOlympicsMedalStandingsJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setAbridgedMaximumRank(extracted_integer);
    }
コード例 #3
0
    private void  fromJSONProgressUpdateCount(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field ProgressUpdateCount of FlightSearchProgressDetailsJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field ProgressUpdateCount of FlightSearchProgressDetailsJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setProgressUpdateCount(extracted_integer);
    }
コード例 #4
0
    private void  fromJSONID(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field ID of NutrientJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field ID of NutrientJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setID(extracted_integer);
    }
コード例 #5
0
    private void  fromJSONSecondsBeforeStartOfEvent(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field SecondsBeforeStartOfEvent of CalendarReminderJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field SecondsBeforeStartOfEvent of CalendarReminderJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setSecondsBeforeStartOfEvent(extracted_integer);
    }
    private void  fromJSONOrdinal(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field Ordinal of ChineseZodiacSignOfSignInfoNuggetJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field Ordinal of ChineseZodiacSignOfSignInfoNuggetJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setOrdinal(extracted_integer);
    }
コード例 #7
0
    private void  fromJSONBronzeMedals(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field BronzeMedals of SportsOlympicsMedalStandingsOrganizationMedalCountJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field BronzeMedals of SportsOlympicsMedalStandingsOrganizationMedalCountJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setBronzeMedals(extracted_integer);
    }
コード例 #8
0
    private void  fromJSONLastAlbumListIndex(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field LastAlbumListIndex of MusicSearchResultsJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field LastAlbumListIndex of MusicSearchResultsJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setLastAlbumListIndex(extracted_integer);
    }
コード例 #9
0
    private void  fromJSONAlternateListingID(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field AlternateListingID of StockConversationRequestedListingJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field AlternateListingID of StockConversationRequestedListingJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setAlternateListingID(extracted_integer);
    }
コード例 #10
0
    private void  fromJSONYear(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field Year of SportsOlympicsBasicAttributeArgumentYearJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field Year of SportsOlympicsBasicAttributeArgumentYearJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setYear(extracted_integer);
    }
コード例 #11
0
    private void  fromJSONOutcomeCount(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field OutcomeCount of SportsTeamAndRankJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field OutcomeCount of SportsTeamAndRankJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setOutcomeCount(extracted_integer);
    }
コード例 #12
0
    private void  fromJSONIntermediateDestinationPositionFromEnd(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field IntermediateDestinationPositionFromEnd of RemainingDistanceCommandJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field IntermediateDestinationPositionFromEnd of RemainingDistanceCommandJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setIntermediateDestinationPositionFromEnd(extracted_integer);
    }
コード例 #13
0
    private void  fromJSONResultIndexReferenced(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field ResultIndexReferenced of HotelSearchConversationStateElementJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field ResultIndexReferenced of HotelSearchConversationStateElementJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setResultIndexReferenced(extracted_integer);
    }
コード例 #14
0
    private void  fromJSONYear(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field Year of MonthLengthLookupInformationNuggetJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field Year of MonthLengthLookupInformationNuggetJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setYear(extracted_integer);
    }
コード例 #15
0
    private void  fromJSONCount(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field Count of BattleshipDictateCoordinatesCommandJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field Count of BattleshipDictateCoordinatesCommandJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setCount(extracted_integer);
    }
    private void  fromJSONFirstDigitCount(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field FirstDigitCount of FiniteIntegerDashFiniteIntegerBuildingNumberJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field FirstDigitCount of FiniteIntegerDashFiniteIntegerBuildingNumberJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setFirstDigitCount(extracted_integer);
    }
コード例 #17
0
    private void  fromJSONUpdatedBlockCount(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field UpdatedBlockCount of TerrierUploadWriteCommandJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field UpdatedBlockCount of TerrierUploadWriteCommandJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setUpdatedBlockCount(extracted_integer);
    }
コード例 #18
0
    private void  fromJSONStartColumnNumber(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field StartColumnNumber of UploadedCodeSourceJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field StartColumnNumber of UploadedCodeSourceJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setStartColumnNumber(extracted_integer);
    }
コード例 #19
0
    private void  fromJSONRankResult(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field RankResult of SportsPlayoffTriviaInformationNuggetJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field RankResult of SportsPlayoffTriviaInformationNuggetJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setRankResult(extracted_integer);
    }
コード例 #20
0
    private void  fromJSONRank(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field Rank of SportsOlympicsEventSchedulesAndResultsInstanceMedalWinnerJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field Rank of SportsOlympicsEventSchedulesAndResultsInstanceMedalWinnerJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setRank(extracted_integer);
    }
    private void  fromJSONGuessesMade(JSONValue json_value, bool ignore_extras)
    {
        Debug.Assert(json_value != null);
        BigInteger       extracted_integer;
        JSONIntegerValue json_integer = json_value.integer_value();

        if (json_integer == null)
        {
            JSONRationalValue json_rational = json_value.rational_value();
            if (json_rational == null)
            {
                throw new Exception("The value for field GuessesMade of NumberGuessQuitGameInformationNuggetJSON is not a number.");
            }
            if (!(json_rational.isInteger()))
            {
                throw new Exception("The value for field GuessesMade of NumberGuessQuitGameInformationNuggetJSON is not an integer.");
            }
            extracted_integer = json_rational.getInteger();
        }
        else
        {
            extracted_integer = json_integer.getData();
        }
        setGuessesMade(extracted_integer);
    }
コード例 #22
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)
        {
        }
    }
コード例 #23
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)
        {
        }
    }
コード例 #24
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)
        {
        }
    }
コード例 #25
0
    private void  fromJSONAnswers(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 Answers of UserFeedbackMultipleChoiceJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <BigInteger> vector_Answers1 = 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 Answers of UserFeedbackMultipleChoiceJSON is not a number.");
                }
                if (!(json_rational.isInteger()))
                {
                    throw new Exception("The value for an element of field Answers of UserFeedbackMultipleChoiceJSON is not an integer.");
                }
                extracted_integer = json_rational.getInteger();
            }
            else
            {
                extracted_integer = json_integer.getData();
            }
            vector_Answers1.Add(extracted_integer);
        }
        initAnswers();
        for (int num3 = 0; num3 < vector_Answers1.Count; ++num3)
        {
            appendAnswers(vector_Answers1[num3]);
        }
        for (int num1 = 0; num1 < vector_Answers1.Count; ++num1)
        {
        }
    }
コード例 #26
0
    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 PhoneDisambiguationOmitListJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <BigInteger> vector_Value1 = 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 Value of PhoneDisambiguationOmitListJSON is not a number.");
                }
                if (!(json_rational.isInteger()))
                {
                    throw new Exception("The value for an element of field Value of PhoneDisambiguationOmitListJSON is not an integer.");
                }
                extracted_integer = json_rational.getInteger();
            }
            else
            {
                extracted_integer = json_integer.getData();
            }
            vector_Value1.Add(extracted_integer);
        }
        initValue();
        for (int num1 = 0; num1 < vector_Value1.Count; ++num1)
        {
            appendValue(vector_Value1[num1]);
        }
        for (int num1 = 0; num1 < vector_Value1.Count; ++num1)
        {
        }
    }
コード例 #27
0
    private void  fromJSONGamesIndices(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 GamesIndices of SportsOlympicsBasicAttributeQueryComponentJSON is not an array.");
        }
        int count1 = json_array1.componentCount();
        List <BigInteger> vector_GamesIndices1 = 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 GamesIndices of SportsOlympicsBasicAttributeQueryComponentJSON is not a number.");
                }
                if (!(json_rational.isInteger()))
                {
                    throw new Exception("The value for an element of field GamesIndices of SportsOlympicsBasicAttributeQueryComponentJSON is not an integer.");
                }
                extracted_integer = json_rational.getInteger();
            }
            else
            {
                extracted_integer = json_integer.getData();
            }
            vector_GamesIndices1.Add(extracted_integer);
        }
        initGamesIndices();
        for (int num1 = 0; num1 < vector_GamesIndices1.Count; ++num1)
        {
            appendGamesIndices(vector_GamesIndices1[num1]);
        }
        for (int num1 = 0; num1 < vector_GamesIndices1.Count; ++num1)
        {
        }
    }