REST: curl abstraction and json parser