port existing REST lib, add gson to libs