Added support for delay and expires_in #10

wants to merge 1 commit into


None yet
2 participants

thejo commented Apr 23, 2012

Delay works, but, I could not get expires_in to work. I'm able to retrieve the message even after the expiry time. The JSON appears to be in the correct format.

I would rather conform to Java conventions than our API conventions. Please rename this to expiresIn.


thejo replied Apr 23, 2012

The JSON serializer will use "expiresIn" as the parameter, but your API expects "expires_in". That's why I broke Java convention and named the variable expires_in. Does your REST API accept expiresIn as the parameter? I can change it if it does.

Ah, I see, that would be invalid. I suppose it's alright to keep this name for the private variable but change the mutator and accessor. I'll probably have to rework how serialization is done at some point anyway.


thejo replied Apr 23, 2012

That was how I had implemented it. It looks like the getter and setter names are used in the serialization. I had to rename them to get the correct JSON format. You can try it.

Ok, I'll have a play with it. What a hassle (but not your fault at all).

As above, please rename this to getExpiresIn

Please rename to setExpiresIn and the argument to expiresIn

edsrzf commented on 0898536 Apr 23, 2012

Thanks! This looks pretty good overall.

I made some comments inline. You can address them yourself or I can just fix them if you like. Either way's fine with me.


thejo replied Apr 23, 2012

Can you confirm that using "expiresIn" in the JSON POSTed to your REST API valid.


edsrzf commented Apr 24, 2012

Thejo, do you have any opinion on moving from json-lib to google-gson? I'm thinking that if I'm making changes to JSON serialization it would be nice for this package to use the same JSON package as iron_worker_java.

I don't have a good feeling about whether one JSON package is more popular than the other.

thejo commented Apr 24, 2012

I use Google Gson, and can recommend it. But, I can't claim to have a lot of data about performance etc. I've heard good things about Jackson too. When I was trying to pick one, it seemed like Gson was the most popular one based on recommendations on Stack Overflow and elsewhere.


edsrzf commented May 24, 2012

I've added this feature as part of the 0.0.5 release (which now also requires gson instead of jsonlib). Sorry it took so long.

@edsrzf edsrzf closed this May 24, 2012

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment