You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Scala module (Jackson 3.x): some work needed wrt JSTEP-4 (unchecked exceptions)ย #494
and I intend to merge changes to master of most repos soon (January 19th, 2021), with force publish to get 3.0.0-SNAPSHOT. Right now changes are on exp/jstep-4-for-3.0 branches of affect repos, most notably for jackson-core and jackson-databind.
This issue is just created for coordination: I will update details once I merge changes. Not the ideal mechanism for sure, but hope it's better than mailing lists at least.
changed the title [-]Scala 3: some work needed wrt JSTEP-4 (unchecked exceptions)[/-][+]Scala module (Jackson 3.x): some work needed wrt JSTEP-4 (unchecked exceptions)[/+]on Jan 19, 2021
Changes mentioned have now been made and a new 3.0.0-SNAPSHOT of core components published.
In most cases changes needed should be simply either replacing "throws IOException" (and similar) with "throws JacksonException", or just removing (since exceptions are now unchecked): I have tried to indicate likeliest base exception for documentation purpose.
@pjfanning Excellent. Thank you for verification. I should be able to check this on my end too, just hadn't had time to see (still have some loose ends wrt JAX-RS).
@cowtowncoder I updated a few compilation issues due to rename of getCurrentToken to currentToken.
These 5 issues still exist in main source (and others likely to exist in test source).
[info] compiling 60 Scala sources and 1 Java source to /Users/pj.fanning/code/jackson-module-scala/target/scala-2.13/classes ...
[error] /Users/pj.fanning/code/jackson-module-scala/src/main/scala/com/fasterxml/jackson/module/scala/deser/EitherDeserializer.scala:53:22: value nextFieldName is not a member of com.fasterxml.jackson.core.JsonParser
[error] val key = jp.nextFieldName()
[error] ^
[error] /Users/pj.fanning/code/jackson-module-scala/src/main/scala/com/fasterxml/jackson/module/scala/ser/EitherSerializer.scala:106:10: value writeFieldName is not a member of com.fasterxml.jackson.core.JsonGenerator
[error] jgen.writeFieldName(field)
[error] ^
[error] /Users/pj.fanning/code/jackson-module-scala/src/main/scala/com/fasterxml/jackson/module/scala/ser/EnumerationSerializerModule.scala:30:10: value writeStringField is not a member of com.fasterxml.jackson.core.JsonGenerator
[error] jgen.writeStringField("enumClass", enumClass)
[error] ^
[error] /Users/pj.fanning/code/jackson-module-scala/src/main/scala/com/fasterxml/jackson/module/scala/ser/EnumerationSerializerModule.scala:31:10: value writeStringField is not a member of com.fasterxml.jackson.core.JsonGenerator
[error] jgen.writeStringField("value", value.toString)
[error] ^
[error] /Users/pj.fanning/code/jackson-module-scala/src/main/scala/com/fasterxml/jackson/module/scala/ser/TupleSerializerModule.scala:15:40: value writeObject is not a member of com.fasterxml.jackson.core.JsonGenerator
[error] did you mean writeObjectId?
[error] value.productIterator.foreach(jgen.writeObject _)
[error] ^
[error] 5 errors found
[error] (Compile / compileIncremental) Compilation failed
[error] Total time: 77 s (01:17), completed 26-Jan-2021 12:12:37
Activity
[-]Scala 3: some work needed wrt JSTEP-4 (unchecked exceptions)[/-][+]Scala module (Jackson 3.x): some work needed wrt JSTEP-4 (unchecked exceptions)[/+]cowtowncoder commentedon Jan 20, 2021
Changes mentioned have now been made and a new 3.0.0-SNAPSHOT of core components published.
In most cases changes needed should be simply either replacing "throws IOException" (and similar) with "throws JacksonException", or just removing (since exceptions are now unchecked): I have tried to indicate likeliest base exception for documentation purpose.
pjfanning commentedon Jan 20, 2021
scala does not force you to explicitly deal with exceptions -- it's almost like it treats every exception as a RuntimeException
so far, there are no issues with jackson-module-scala -- no new compile problems or additional test failures
cowtowncoder commentedon Jan 20, 2021
@pjfanning Excellent. Thank you for verification. I should be able to check this on my end too, just hadn't had time to see (still have some loose ends wrt JAX-RS).
pjfanning commentedon Jan 26, 2021
@cowtowncoder I updated a few compilation issues due to rename of getCurrentToken to currentToken.
These 5 issues still exist in main source (and others likely to exist in test source).
cowtowncoder commentedon Jan 26, 2021
@pjfanning Thanks, apologies for lag in fixing these -- I hope to be done with streaming-level changes soon.
Fixes for these are:
writeFieldName()->writeName()(big effort to remove refs to "field"; in most cases becomes "property" if not eliminated like here)nextFieldName()->nextName()similarlywriteXxxField()->writeXxxProperty()(writeStringProperty()) herewriteObject()->writePOJO()(since "Object" elsewhere refers to JSON Object type, butwriteObject()is to serialize Java Objects (aka POJOs).pjfanning commentedon Jan 31, 2021
closing in favour if #431 - builds are passing (although a few tests that work in jackson 2 have been disabled for a while)