Resty icon indicating copy to clipboard operation
Resty copied to clipboard

Added option to retrieve boolean response from JSON content

Open padcom opened this issue 9 years ago • 1 comments

Hi,

sometimes the content returned is a constant true/false. Since there is no way to set the content type for TextResource I've created the "toBoolean" method on JSONResource that simply casts the unmarshaled object to boolean.

I need this since the service I am integrating with is very strict in the content it accepts and can produce (application/json and nothing else) and returns a true/false value.

Best regards, Matthias.

padcom avatar Jul 02 '15 13:07 padcom

I've had problems building the solution because of some GPG plugin problem but I've tested the pull request otherwise directly from Eclipse and it worked OK.

padcom avatar Jul 02 '15 13:07 padcom