users@jersey.java.net

More: handling urls with {

From: Carmen Delessio <carmendelessio_at_gmail.com>
Date: Tue, 31 Mar 2009 17:43:52 -0400

I've hit the same issue and wanted to provide a specific scenario.
I am using the Jersey Client to talk directly to the Facebook Rest server.

It working well, but some Facebook requests take JSONArrays as paramaters.

This is an example of what is expected as a Facebook parameter
"images":[{ "src":"http:\/\/www.facebook.com\/images\/image1.gif",
"href":"http:\/\/www.facebook.com" }]

My code looks something like:

UriBuilder ub =UriBuilder.fromPath(facebookRestServer);
...
ub.queryParam("template_data", stringWithCurlyBrackets);
URI uri = ub.build();
resource = restClient.resource(uri);
restResponse =resource.get(ClientResponse.class);

A workaround would be great and if I'm going in the wrong direction, please
let me know.

I've tried to work around this by replacing { with %7b, but that led to some
issues with Facebook signatures. I will continue on that path.

Carmen
--
Carmen Delessio
http://www.socialjava.com