You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@isis.apache.org by Erik de Hair <er...@pocos.nl> on 2014/06/03 13:49:51 UTC

Restful objects decoding json request body?

Hi,

I have a json-string with a '+'-sign in a value fired at the restful interface.

Example json:
{"hashedUsername":{"value":"c9151beda37570547e36ce66910573a4"},"password":{"value":"abc+def"},"passwordRepeated":{"value":"abc+def"}}

This string is directly put into the PUT request as body. The value in my action-method (called by the restful call) looks URL-decoded because the '+'-sign is replaced by a whitespace.

Is this expected behaviour? Can this be manipulated/configured?

Erik

Re: Restful objects decoding json request body?

Posted by Dan Haywood <da...@haywood-associates.co.uk>.
Thanks, Erik.

Patches also welcome!

Cheers
Dan



On 4 June 2014 08:50, Erik de Hair <er...@pocos.nl> wrote:

> Ok, will try to create a work around for now.
>
> Raised a ticket: https://issues.apache.org/jira/browse/ISIS-797
>
> Erik
>
> On 06/03/2014 02:13 PM, Jeroen van der Wal wrote:
> > Hi Erik,
> >
> > I've seen this before, it is a bug. Could you raise a ticket in JIRA [1]?
> >
> > Cheers,
> >
> > Jeroen
> >
> >
> > [1] https://issues.apache.org/jira/browse/ISIS
> >
> >
> >
> >
> > On Tue, Jun 3, 2014 at 1:49 PM, Erik de Hair <er...@pocos.nl> wrote:
> >
> >> Hi,
> >>
> >> I have a json-string with a '+'-sign in a value fired at the restful
> >> interface.
> >>
> >> Example json:
> >>
> >>
> {"hashedUsername":{"value":"c9151beda37570547e36ce66910573a4"},"password":{"value":"abc+def"},"passwordRepeated":{"value":"abc+def"}}
> >>
> >> This string is directly put into the PUT request as body. The value in
> my
> >> action-method (called by the restful call) looks URL-decoded because the
> >> '+'-sign is replaced by a whitespace.
> >>
> >> Is this expected behaviour? Can this be manipulated/configured?
> >>
> >> Erik
> >>
>
>

Re: Restful objects decoding json request body?

Posted by Erik de Hair <er...@pocos.nl>.
Ok, will try to create a work around for now.

Raised a ticket: https://issues.apache.org/jira/browse/ISIS-797

Erik

On 06/03/2014 02:13 PM, Jeroen van der Wal wrote:
> Hi Erik,
>
> I've seen this before, it is a bug. Could you raise a ticket in JIRA [1]?
>
> Cheers,
>
> Jeroen
>
>
> [1] https://issues.apache.org/jira/browse/ISIS
>
>
>
>
> On Tue, Jun 3, 2014 at 1:49 PM, Erik de Hair <er...@pocos.nl> wrote:
>
>> Hi,
>>
>> I have a json-string with a '+'-sign in a value fired at the restful
>> interface.
>>
>> Example json:
>>
>> {"hashedUsername":{"value":"c9151beda37570547e36ce66910573a4"},"password":{"value":"abc+def"},"passwordRepeated":{"value":"abc+def"}}
>>
>> This string is directly put into the PUT request as body. The value in my
>> action-method (called by the restful call) looks URL-decoded because the
>> '+'-sign is replaced by a whitespace.
>>
>> Is this expected behaviour? Can this be manipulated/configured?
>>
>> Erik
>>


Re: Restful objects decoding json request body?

Posted by Jeroen van der Wal <je...@stromboli.it>.
Hi Erik,

I've seen this before, it is a bug. Could you raise a ticket in JIRA [1]?

Cheers,

Jeroen


[1] https://issues.apache.org/jira/browse/ISIS




On Tue, Jun 3, 2014 at 1:49 PM, Erik de Hair <er...@pocos.nl> wrote:

> Hi,
>
> I have a json-string with a '+'-sign in a value fired at the restful
> interface.
>
> Example json:
>
> {"hashedUsername":{"value":"c9151beda37570547e36ce66910573a4"},"password":{"value":"abc+def"},"passwordRepeated":{"value":"abc+def"}}
>
> This string is directly put into the PUT request as body. The value in my
> action-method (called by the restful call) looks URL-decoded because the
> '+'-sign is replaced by a whitespace.
>
> Is this expected behaviour? Can this be manipulated/configured?
>
> Erik
>