Description
There's a change in behaviour between 0.3.8 and 0.3.9 with how errors are reported in the exception message. The source is now redacted from the error message.
That seems like a more secure default, but is there a way to control this in the options to get the same behaviour as before?
0.3.8
(require '[jsonista.core :as j])
(j/read-value "{\"result\": \"value\"" j/keyword-keys-object-mapper)
Execution error (JsonEOFException) at com.fasterxml.jackson.core.base.ParserMinimalBase/_reportInvalidEOF (ParserMinimalBase.java:697).
Unexpected end-of-input: expected close marker for Object (start marker at [Source: (String)"{"result": "value""; line: 1, column: 1])
at [Source: (String)"{"result": "value""; line: 1, column: 19]
0.3.9
(require '[jsonista.core :as j])
(j/read-value "{\"result\": \"value\"" j/keyword-keys-object-mapper)
Execution error (JsonEOFException) at com.fasterxml.jackson.core.base.ParserMinimalBase/_reportInvalidEOF (ParserMinimalBase.java:585).
Unexpected end-of-input: expected close marker for Object (start marker at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 1])
at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 19]
A likely cause is that the jackson deps have jumped and I'm not sure if that was intentional or not. I only say this because the 0.3.9 release notes say that you use 2.15.2 even though 2.17.1 is available, but jsonista's definitely using 2.17.1 now.
[com.fasterxml.jackson.core/jackson-core "2.17.1"] is available but we use "2.15.2"
[com.fasterxml.jackson.core/jackson-databind "2.17.1"] is available but we use "2.15.2"
[com.fasterxml.jackson.datatype/jackson-datatype-jsr310 "2.17.1"] is available but we use "2.15.2"
0.3.8
echo '{:deps {metosin/jsonista {:mvn/version "0.3.8"}}}' > deps.edn
clj -Xdeps tree
org.clojure/clojure 1.11.3
. org.clojure/spec.alpha 0.3.218
. org.clojure/core.specs.alpha 0.2.62
metosin/jsonista 0.3.8
. com.fasterxml.jackson.core/jackson-core 2.15.2
. com.fasterxml.jackson.core/jackson-databind 2.15.2
. com.fasterxml.jackson.core/jackson-annotations 2.15.2
. com.fasterxml.jackson.core/jackson-core 2.15.2
. com.fasterxml.jackson.datatype/jackson-datatype-jsr310 2.15.2
. com.fasterxml.jackson.core/jackson-annotations 2.15.2
. com.fasterxml.jackson.core/jackson-core 2.15.2
. com.fasterxml.jackson.core/jackson-databind 2.15.2
0.3.9
echo '{:deps {metosin/jsonista {:mvn/version "0.3.9"}}}' > deps.edn
clj -Xdeps tree
org.clojure/clojure 1.11.3
. org.clojure/spec.alpha 0.3.218
. org.clojure/core.specs.alpha 0.2.62
metosin/jsonista 0.3.9
. com.fasterxml.jackson.core/jackson-core 2.17.1
. com.fasterxml.jackson.core/jackson-databind 2.17.1
. com.fasterxml.jackson.core/jackson-annotations 2.17.1
. com.fasterxml.jackson.core/jackson-core 2.17.1
. com.fasterxml.jackson.datatype/jackson-datatype-jsr310 2.17.1
. com.fasterxml.jackson.core/jackson-annotations 2.17.1
. com.fasterxml.jackson.core/jackson-core 2.17.1
. com.fasterxml.jackson.core/jackson-databind 2.17.1