Skip to content

Commit

Permalink
Changes wrt [core#1378]
Browse files Browse the repository at this point in the history
  • Loading branch information
cowtowncoder committed Jan 3, 2025
1 parent ef99aba commit ebcb134
Show file tree
Hide file tree
Showing 11 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public Duration deserialize(JsonParser parser, DeserializationContext context)
case JsonTokenId.ID_NUMBER_INT:
return _fromTimestamp(context, parser.getLongValue());
case JsonTokenId.ID_STRING:
return _fromString(parser, context, parser.getText());
return _fromString(parser, context, parser.getString());
// 30-Sep-2020, tatu: New! "Scalar from Object" (mostly for XML)
case JsonTokenId.ID_START_OBJECT:
return _fromString(parser, context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ public T deserialize(JsonParser parser, DeserializationContext context)
case JsonTokenId.ID_NUMBER_INT:
return _fromLong(context, parser.getLongValue());
case JsonTokenId.ID_STRING:
return _fromString(parser, context, parser.getText());
return _fromString(parser, context, parser.getString());
// 30-Sep-2020, tatu: New! "Scalar from Object" (mostly for XML)
case JsonTokenId.ID_START_OBJECT:
return _fromString(parser, context,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ public Object deserialize(JsonParser p, DeserializationContext ctxt)
throws JacksonException
{
if (p.hasToken(JsonToken.VALUE_STRING)) {
return _fromString(p, ctxt, p.getText());
return _fromString(p, ctxt, p.getString());
}
// 30-Sep-2020, tatu: New! "Scalar from Object" (mostly for XML)
if (p.isExpectedStartObjectToken()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public LocalDate deserialize(JsonParser parser, DeserializationContext context)
throws JacksonException
{
if (parser.hasToken(JsonToken.VALUE_STRING)) {
return _fromString(parser, context, parser.getText());
return _fromString(parser, context, parser.getString());
}
// 30-Sep-2020, tatu: New! "Scalar from Object" (mostly for XML)
if (parser.isExpectedStartObjectToken()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ protected JSR310DateTimeDeserializerBase<?> _withFormatOverrides(Deserialization
public LocalDateTime deserialize(JsonParser parser, DeserializationContext context) throws JacksonException
{
if (parser.hasTokenId(JsonTokenId.ID_STRING)) {
return _fromString(parser, context, parser.getText());
return _fromString(parser, context, parser.getString());
}
// 30-Sep-2020, tatu: New! "Scalar from Object" (mostly for XML)
if (parser.isExpectedStartObjectToken()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ protected JSR310DateTimeDeserializerBase<?> _withFormatOverrides(Deserialization
public LocalTime deserialize(JsonParser parser, DeserializationContext context) throws JacksonException
{
if (parser.hasToken(JsonToken.VALUE_STRING)) {
return _fromString(parser, context, parser.getText());
return _fromString(parser, context, parser.getString());
}
// 30-Sep-2020, tatu: New! "Scalar from Object" (mostly for XML)
if (parser.isExpectedStartObjectToken()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ public MonthDay deserialize(JsonParser parser, DeserializationContext context)
throws JacksonException
{
if (parser.hasToken(JsonToken.VALUE_STRING)) {
return _fromString(parser, context, parser.getText());
return _fromString(parser, context, parser.getString());
}
// 30-Sep-2020, tatu: New! "Scalar from Object" (mostly for XML)
if (parser.isExpectedStartObjectToken()) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ public OffsetTime deserialize(JsonParser parser, DeserializationContext context)
throws JacksonException
{
if (parser.hasToken(JsonToken.VALUE_STRING)) {
return _fromString(parser, context, parser.getText());
return _fromString(parser, context, parser.getString());
}
// 30-Sep-2020, tatu: New! "Scalar from Object" (mostly for XML)
if (parser.isExpectedStartObjectToken()) {
Expand Down Expand Up @@ -160,7 +160,7 @@ public OffsetTime deserialize(JsonParser parser, DeserializationContext context)
}
}
if (parser.currentToken() == JsonToken.VALUE_STRING) {
OffsetTime result = OffsetTime.of(hour, minute, second, partialSecond, ZoneOffset.of(parser.getText()));
OffsetTime result = OffsetTime.of(hour, minute, second, partialSecond, ZoneOffset.of(parser.getString()));
if (parser.nextToken() != JsonToken.END_ARRAY) {
_reportWrongToken(context, JsonToken.END_ARRAY, "timezone");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ public OneBasedMonthDeserializer(ValueDeserializer<?> defaultDeserializer) {
public Object deserialize(JsonParser parser, DeserializationContext context) {
JsonToken token = parser.currentToken();
Month zeroBaseMonth = (Month) getDelegatee().deserialize(parser, context);
if (!_isNumericValue(parser.getText(), token)) {
if (!_isNumericValue(parser.getString(), token)) {
return zeroBaseMonth;
}
if (zeroBaseMonth == Month.JANUARY) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public Year deserialize(JsonParser parser, DeserializationContext context) throw
{
JsonToken t = parser.currentToken();
if (t == JsonToken.VALUE_STRING) {
return _fromString(parser, context, parser.getText());
return _fromString(parser, context, parser.getString());
}
// 30-Sep-2020, tatu: New! "Scalar from Object" (mostly for XML)
if (t == JsonToken.START_OBJECT) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ protected YearMonthDeserializer withLeniency(Boolean leniency) {
public YearMonth deserialize(JsonParser parser, DeserializationContext context) throws JacksonException
{
if (parser.hasToken(JsonToken.VALUE_STRING)) {
return _fromString(parser, context, parser.getText());
return _fromString(parser, context, parser.getString());
}
// 30-Sep-2020, tatu: New! "Scalar from Object" (mostly for XML)
if (parser.isExpectedStartObjectToken()) {
Expand Down

0 comments on commit ebcb134

Please sign in to comment.