using rest with json