Skip to content

rest api: add support for Java8 Optional data type#8020

Open
DmitryLitvintsev wants to merge 1 commit into11.1from
fix/11.1/8007
Open

rest api: add support for Java8 Optional data type#8020
DmitryLitvintsev wants to merge 1 commit into11.1from
fix/11.1/8007

Conversation

@DmitryLitvintsev
Copy link
Member

Motivation:

With upgrade of jackson dependencies for 11.x handling of Optional datatype started to fail like so:

"Unable to interpret JSON: Java 8 optional type java.util.Optional<java.lang.Double>..."

when calling rest api to query pool information

Modification:

Following this recipe:

https://github.com/FasterXML/jackson-modules-java8

registered Jdk8Module to json ObjectMapper

Result:

No more error

Ticket: #8007
Patch: https://rb.dcache.org/r/14616/
Acked-by: Marina
Target: trunk
Request: 11.x
Require-book: no
Require-notes: yes

Motivation:
-----------

With upgrade of jackson dependencies for 11.x handling of
Optional datatype started to fail like so:

"Unable to interpret JSON: Java 8 optional type `java.util.Optional<java.lang.Double>`..."

when calling rest api to query pool information

Modification:
-------------

Following this recipe:

https://github.com/FasterXML/jackson-modules-java8

registered Jdk8Module to json ObjectMapper

Result:
-------

No more error

Ticket: #8007
Patch: https://rb.dcache.org/r/14616/
Acked-by: Marina
Target: trunk
Request: 11.x
Require-book: no
Require-notes: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant