Json support for rest api