convert json stuff to conventional use

nil to empty array, values to integer
raffle functionality