Added RestAPI with custom json encoder