change attibute from rb to json