Make rest work with json