private void fromJSONNumberOfPlayerCards(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); sbyte 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 NumberOfPlayerCards of HandHistoryJSON is not a number."); } if (!(json_rational.isInteger())) { throw new Exception("The value for field NumberOfPlayerCards of HandHistoryJSON is not an integer."); } extracted_integer = (sbyte)(json_rational.getLongInt()); } else { extracted_integer = (sbyte)(json_integer.getLongInt()); } setNumberOfPlayerCards(extracted_integer); }
private void fromJSONMonthIndex(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); sbyte 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 MonthIndex of MonthLengthLookupInformationNuggetJSON is not a number."); } if (!(json_rational.isInteger())) { throw new Exception("The value for field MonthIndex of MonthLengthLookupInformationNuggetJSON is not an integer."); } extracted_integer = (sbyte)(json_rational.getLongInt()); } else { extracted_integer = (sbyte)(json_integer.getLongInt()); } setMonthIndex(extracted_integer); }
private void fromJSONChannel(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); byte 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 Channel of SiriusChannelCommandIntentJSON is not a number."); } if (!(json_rational.isInteger())) { throw new Exception("The value for field Channel of SiriusChannelCommandIntentJSON is not an integer."); } extracted_integer = (byte)(json_rational.getLongInt()); } else { extracted_integer = (byte)(json_integer.getLongInt()); } setChannel(extracted_integer); }
private void fromJSONValue(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); long 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 Value of SoundHoundAlbumIDJSON is not a number."); } if (!(json_rational.isInteger())) { throw new Exception("The value for field Value of SoundHoundAlbumIDJSON is not an integer."); } extracted_integer = (long)(json_rational.getLongInt()); } else { extracted_integer = (long)(json_integer.getLongInt()); } setValue(extracted_integer); }
private void fromJSONPresetNumber(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); sbyte 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 PresetNumber of RadioPresetCommandJSON is not a number."); } if (!(json_rational.isInteger())) { throw new Exception("The value for field PresetNumber of RadioPresetCommandJSON is not an integer."); } extracted_integer = (sbyte)(json_rational.getLongInt()); } else { extracted_integer = (sbyte)(json_integer.getLongInt()); } setPresetNumber(extracted_integer); }
private void fromJSONDealerHandTotal(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); sbyte 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 DealerHandTotal of BlackjackDoubledownInformationNuggetJSON is not a number."); } if (!(json_rational.isInteger())) { throw new Exception("The value for field DealerHandTotal of BlackjackDoubledownInformationNuggetJSON is not an integer."); } extracted_integer = (sbyte)(json_rational.getLongInt()); } else { extracted_integer = (sbyte)(json_integer.getLongInt()); } setDealerHandTotal(extracted_integer); }
private void fromJSONDirection(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); short 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 Direction of RobotTurnCommandJSON is not a number."); } if (!(json_rational.isInteger())) { throw new Exception("The value for field Direction of RobotTurnCommandJSON is not an integer."); } extracted_integer = (short)(json_rational.getLongInt()); } else { extracted_integer = (short)(json_integer.getLongInt()); } setDirection(extracted_integer); }
private void fromJSONFlightNumber(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); short 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 FlightNumber of AirlineFlightNumberJSON is not a number."); } if (!(json_rational.isInteger())) { throw new Exception("The value for field FlightNumber of AirlineFlightNumberJSON is not an integer."); } extracted_integer = (short)(json_rational.getLongInt()); } else { extracted_integer = (short)(json_integer.getLongInt()); } setFlightNumber(extracted_integer); }
private void fromJSONXCoordinate(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); sbyte 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 XCoordinate of BattleshipCoordinateJSON is not a number."); } if (!(json_rational.isInteger())) { throw new Exception("The value for field XCoordinate of BattleshipCoordinateJSON is not an integer."); } extracted_integer = (sbyte)(json_rational.getLongInt()); } else { extracted_integer = (sbyte)(json_integer.getLongInt()); } setXCoordinate(extracted_integer); }
private void fromJSONEndTime(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); int 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 EndTime of LocalResultBusinessHoursJSON is not a number."); } if (!(json_rational.isInteger())) { throw new Exception("The value for field EndTime of LocalResultBusinessHoursJSON is not an integer."); } extracted_integer = (int)(json_rational.getLongInt()); } else { extracted_integer = (int)(json_integer.getLongInt()); } setEndTime(extracted_integer); }
private void fromJSONSpeed(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); byte 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 Speed of VoiceParametersJSON is not a number."); } if (!(json_rational.isInteger())) { throw new Exception("The value for field Speed of VoiceParametersJSON is not an integer."); } extracted_integer = (byte)(json_rational.getLongInt()); } else { extracted_integer = (byte)(json_integer.getLongInt()); } setSpeed(extracted_integer); }
private void fromJSONTenseIndicator(JSONValue json_value, bool ignore_extras) { Debug.Assert(json_value != null); sbyte 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 TenseIndicator of ChineseZodiacSignOfYearInfoNuggetJSON is not a number."); } if (!(json_rational.isInteger())) { throw new Exception("The value for field TenseIndicator of ChineseZodiacSignOfYearInfoNuggetJSON is not an integer."); } extracted_integer = (sbyte)(json_rational.getLongInt()); } else { extracted_integer = (sbyte)(json_integer.getLongInt()); } setTenseIndicator(extracted_integer); }