jersey - JAX-RS deserialization of empty string instead of objects -


jax-rs (jersey) failing @ deserializing following:

{ "coveragestores": "" } 

now coveragestores supposed object, expect json be:

{ "coveragestores": null } 

instead, not.

is there way tell jax-rs handle empty string if null object? saw accept_empty_string_as_null_object use annotation ideally.

fwisw, ended doing this:

private static jacksonjsonprovider jacksonjsonprovider = new jacksonjaxbjsonprovider().configure(deserializationfeature.accept_empty_string_as_null_object, true);  // in method webtarget webtarget = clientbuilder.newclient()                 .register(jacksonjsonprovider)                 .target(urlpath); etc... 

i couldn't find annotation it, it's fine this.


Comments

Popular posts from this blog

node.js - Node js - Trying to send POST request, but it is not loading javascript content -

javascript - Replicate keyboard event with html button -

javascript - Web audio api 5.1 surround example not working in firefox -