convert from ruby has to json objects in birdmain.rb